Jump to content


Photo

Problems starting MySQL


  • Please log in to reply
6 replies to this topic

#1 Nylex

Nylex
  • Members
  • PipPip
  • Member
  • 12 posts
  • LocationLondon, UK

Posted 15 April 2003 - 09:35 AM

I\'ve installed MySQL from source (version 4.0.12 and I\'m using Red Hat 8.0). Am I supposed to start MySQL using ./mysql user=mysql (or root)? I get command not found errors if I just try # mysql or # mysqld. When I do use ./mysql ..., it gives the following error message: ERROR 2002: Can\'t connect to local MySQL server through socket \'/tmp/mysql.sock\' (2)

Can anyone help? Thanks.

#2 effigy

effigy
  • Staff Alumni
  • Advanced Member
  • 3,600 posts
  • LocationIL

Posted 15 April 2003 - 02:56 PM

as root run ./mysqladmin ping and make sure it\'s running.
Regexp | Unicode Article | Letter Database
/\A(e)?((1)?ff(?:(?:ig)?y)?|f(?:ig)?)\z/

#3 Nylex

Nylex
  • Members
  • PipPip
  • Member
  • 12 posts
  • LocationLondon, UK

Posted 15 April 2003 - 03:08 PM

It came up with the same error when I tried ./mysqladmin ping. I then did ./mysqld_safe --user=mysql and then ./mysqladmin again:

./mysqladmin: connect to server at \'localhost\' failed
error: \'Access denied for user: \'root@localhost\' (Using password: NO)\'

Thanks.

#4 effigy

effigy
  • Staff Alumni
  • Advanced Member
  • 3,600 posts
  • LocationIL

Posted 15 April 2003 - 03:11 PM

good deal. now it\'s running. just use the -p switch and it will prompt you for a password. you should have set the root password on installation.
Regexp | Unicode Article | Letter Database
/\A(e)?((1)?ff(?:(?:ig)?y)?|f(?:ig)?)\z/

#5 Nylex

Nylex
  • Members
  • PipPip
  • Member
  • 12 posts
  • LocationLondon, UK

Posted 15 April 2003 - 03:16 PM

I did set the password when I installed. Lol. Thanks a lot (again!).

#6 effigy

effigy
  • Staff Alumni
  • Advanced Member
  • 3,600 posts
  • LocationIL

Posted 15 April 2003 - 03:22 PM

no problem. if you do not want to type -p everytime, open the mysql configuration file and under the heading for the binary, [mysql] for example, put a line under there that simply says \"password.\" now anytime you use mysql it will automatically prompt for a password. no switches needed.
Regexp | Unicode Article | Letter Database
/\A(e)?((1)?ff(?:(?:ig)?y)?|f(?:ig)?)\z/

#7 Nylex

Nylex
  • Members
  • PipPip
  • Member
  • 12 posts
  • LocationLondon, UK

Posted 16 April 2003 - 08:30 AM

Cheers, I\'ll do that. Now my LAMP server is up and running!




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users