LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   MySQL - what do I do now? (https://www.linuxquestions.org/questions/linux-newbie-8/mysql-what-do-i-do-now-258676/)

farhills 11-24-2004 02:20 AM

MySQL - what do I do now?
 
Hi

I am a total Newbie to Linux. So far I have managed to get Apache and PHP working and now I am trying to get MySQL installed.

I am running SuSe 9.2 and have selected and installed the relevant MySQL server and client apps.

When I try to set the root password using mysqladmin I get the error message:

'Cant connect to local MySQL server through socket '/var/lib/mysql/mysql.sock (2)'

When I check the directory above there is no file 'mysql.sock'. There is however a directory below mysql also called mysql ie '/var/lib/mysql/mysql/' but this also doesn't contain mysql.sock.

Can anyone suggest what I need to do to get MySQL up and running and also how to start up a user friendly graphical interface for admin purposes?

Many thanks

MasterC 11-24-2004 02:48 AM

Hi :)

That error generally means you don't have MySQL running. Generically:
/sbin/mysqld

Should start the daemon, however, you probably have an init script of some sort, maybe a:
/etc/init.d/mysql start
Will do the trick, depends on how your distro sets that up.

As for a "GUI" I'd probably guess you will want to use PHPMyAdmin which runs through the browser for your MySQL admin needs, you can also look at webmin, but I think generally people use PHPMyAdmin a bit more often.

Cool

hutuworm 11-24-2004 02:49 AM

Modify /etc/my.cnf :

# The following options will be passed to all MySQL clients
[client]
#password = your_password
port = 3306
socket = /tmp/mysql.sock

# Here follows entries for some specific programs

# The MySQL server
[mysqld]
port = 3306
socket = /tmp/mysql.sock

farhills 11-24-2004 04:00 AM

Hi

Thanks for the advice. So far no luck I am afraid. I tried the following:

/etc/init.d/mysql start gave an error "ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111)"

/usr/sbin/mysqld gae an error "Fatal error: Please read Security section of the manual to find out how to run mysqld as root!"

I have not yet tried edditing my.cnf. I will try that next.

Regards

MasterC 11-24-2004 04:33 AM

Did you ever run:
mysql_install_db

However your distro tells you to? Here's the generic instructions if you were to install from a tarball:
http://dev.mysql.com/doc/mysql/en/Po...tallation.html

Cool

farhills 11-24-2004 05:22 AM

Quote:

Originally posted by MasterC
Did you ever run:
mysql_install_db

However your distro tells you to? Here's the generic instructions if you were to install from a tarball:
http://dev.mysql.com/doc/mysql/en/Po...tallation.html

Cool

Hi

I did run mysql_install_db as instructed in the manual. From memory it said something about installing all prepared tables and then mysqld - shutdown complete.

I have just run the program called mysqltest in usr/bin which "failed in mysql_real_connect(): Can't connect to local MySQL server through socket /var/lib/mysql/mysql.sock"

Still flailing around trying to find out what is wrong. Maybe I should uninstall and try again?

Regards

farhills 11-24-2004 09:50 AM

Hi

I did the usual software engineer's trick of uninstalling the packages, rebooting and reinstalling them. Guess what - MySQL is now up and runing.

Thanks for all your help and advice.

Regards

Hattori 11-27-2004 01:11 PM

mysql.sock
 
I've got the same problem. "in SUSE 9.2 under 9.1 it worked just fine."
Can you tell me witch files you reinstalled.
And did you do this with yast, with update or realy delete.


All times are GMT -5. The time now is 07:27 PM.