views:

80

answers:

2

how do i install libmysqlclient.so on ubuntu

+1  A: 

I do this on centOS (which gets you more than you need):

yum install mysql mysql-devel mysql-server

I believe Ubuntu would be

sudo aptitude mysql

or

sudu aptitude mysql-client

If he is really on a shared server (as the title stated), he probably doesn't have the required privilegies to install software as root (second time I post this comment ^^ last time, the answer has been deleted ^^ ) -- btw, it would probablby be, on Ubuntu, along the lines of "sudo aptitude install mysql-client"
Pascal MARTIN
if he is on a shared server, these should be available I would think. Or at least in my shared hosting days they were. If not, maybe he should ask the company to have it installed or be moved to a server that already has it installed.
yep I am on a shared server so I don't have sudo or root privileges. Any suggestions on how I can install mysql-client without root. I've been haggling with the shared server tech support and their not being very helpful. Sadly I cant switch servers right now...
+1  A: 

There might be a way to install and use mysql client without being root.
(I've tried this on my machine, which is the last version of Ubuntu, 64bits ; it already has the "ubuntu-official" version of MySQL installed, which is a 5.0.x)

First, you can download binaries in "non-RPM" format from MySQL's website : http://dev.mysql.com/downloads/mysql/5.1.html#linux

Un-compress that ; and go into the "bin" directory :

$ tar xvf mysql-5.1.36-linux-x86_64-glibc23.tar.gz
$ cd ~/temp/mysql-5.1.36-linux-x86_64-glibc23/bin

(Depending on your configuration / system, you might not take exactly that package, of course)

There, you have loads of MySQL-related tools ; one of those being mysql command itself :-)
For instance :

$ ./mysql --version
./mysql  Ver 14.14 Distrib 5.1.36, for unknown-linux-gnu (x86_64) using readline 5.1

And, just to be sure it's not the same as the one installed by apt-get, here's the output of that one :

$ mysql --version
mysql  Ver 14.12 Distrib 5.0.75, for debian-linux-gnu (x86_64) using readline 5.2

Hope this helps !
Have fun !


One other solution might be to simply install phpMyAdmin on your server ; but that's only a suggestion ^^
But, just as a sidenote : maybe it would be more compliant with the policy of your hosting service ? Maybe they don't really want people running any kind of binaries on their servers ?


And, with a bit more test, that client seems to at least be able to do some kind queries :

$ ./mysql --host=localhost --user=test --password=123456 test1
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 106993
Server version: 5.0.75-0ubuntu10.2 (Ubuntu)

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> show tables;
+-----------------+
| Tables_in_test1 |
+-----------------+
| test            |
+-----------------+
1 row in set (0.00 sec)

mysql> select * from test;
+----+--------+----------------+------------+------------+
| id | name   | value          | created_at | updated_at |
+----+--------+----------------+------------+------------+
|  1 | Test 1 | My Value 1     | 1248805507 | 1248805507 |
|  2 | Test 2 | My New Value 2 | 1248805583 | 1248805821 |
+----+--------+----------------+------------+------------+
2 rows in set (0.02 sec)
Pascal MARTIN