mysql as installed by suse

Hi i’m trying to create a database with the mysql that came with the suse installation, my problem is that i can’t get mysqladmin to work it spits out this:

connect to server at ‘localhost’ failed
error: ‘Can’t connect to local MySQL server through socket ‘/var/run/mysql/mysql.sock’ (2)’
Check that mysqld is running and that the socket: ‘/var/run/mysql/mysql.sock’ exists!

So I’m stuck at square one php info() seems ok with the installation and the installed client connects to my remote DB ok. I checked the server with ps -ef | grep mysqld and I get the following:

2438 2436 0 15:47 ? 00:00:00 /usr/sbin/mysqld --defaults-file=/home/ben/.local/share/akonadi//mysql.conf --datadir=/home/ben/.local/share/akonadi/db_data/ --socket=/home/ben/.local/share/akonadi/socket-linux-ygk7.site/mysql.socket
root 6248 6151 0 16:01 pts/0 00:00:00 grep mysqld

Which doesn’t really mean a lot to me but looks ok, anyway my question boils down to does anyone have any obvious ideas of what I’m doing wrong or is, as others have hinted, suse’s mysql installation is broken?

Thanks spud.

2438 2436 0 15:47 ? 00:00:00 /usr/sbin/mysqld --defaults-file=/home/ben/.local/share/akonadi//mysql.conf --datadir=/home/ben/.local/share/akonadi/db_data/ --socket=/home/ben/.local/share/akonadi/socket-linux-ygk7.site/mysql.socket

Those are all non-standard options to mysqld, the server. You must have started the server in a non-standard way. Thus you’re not telling us the whole story. You should be starting it as a system service using YaST to enable it.

Edit: Actually looking carefully again, this looks like a separate mysqld run for the purpose of akonadi. It’s not the server you want. You should enable mysql server in YaST.

And please enclose computer output in code tags as above.

Also which release of openSUSE? And hopefully not SUSE Enterprise.

spuddyfodnoshous wrote:
> Which doesn’t really mean a lot to me but looks ok, anyway my question
> boils down to does anyone have any obvious ideas of what I’m doing wrong
> or is, as others have hinted, suse’s mysql installation is broken?

SWAG: I expect you’re hitting the security settings. I think by default
skip_network (or whatever it’s called) is set. It’s documented
somewhere, so google or grep of the config should show it up.

Oh right, I see what you mean it’s a instance of the server set up for akonadi. How do I enable a mysql in yast, I’ve gone through yast and can’t find anything? BTW it’s opensuse 11.4

Thanks.

Yast > System > System services (Runlevel). When you have installed properly from the standard repos, you will find mysql in that list. I hope it is obvious from there.

Once you have successfully started mysqld with yast do the following steps:

  1. Install the pinfo packet

  2. On the command line do:

pinfo mysql

This gets you the manual. You will need it a lot.

  1. Start the mysql client from the command line.
mysql -u root -h localhost -p

Initial password will be empty (just <ENTER>). Note that the user root within mysql has nothing to do with the system admin user root within your openSUSE linux. Just a coincidence of names.

  1. GRANT privileges to the user name you are normally working as, including the GRANT privilege.

  2. Set a password for the mysql user root.

Now you are ready.