At 10:47, 19990915, Scott Mackie wrote:
>I have used Mysql before on Irix and BSDI with little difficulty. I'm
>now trying to put it on a Linux Red hat box. It seemed to install okay,
>but there are no entries in the permissions tables. The error I'm
>getting trying to connect is:
>'ERROR: 2002: Can't connect to local MySQL server through socket
>`/var/lib/mysql/mysql.sock' (111)'.
>After I rebooted the server, I got the error:
>'Error 1045: Access denied for user: 'root@localhost' (Using password:
>NO)'
>
>That file does not exit-- any ideas?
Scott, I'm confused. But how about you kill the server, then start it
up again with the -Sg command. Then see if you can connect. If you
can, then at the mysql> prompt, do this:
mysql> GRANT ALL PRIVILEGES ON *.* TO root@localhost IDENTIFIED BY 'P4s$w0rd'
-> WITH GRANT OPTION;
...OK, 0 rows affected, whatever...
mysql> FLUSH PRIVILEGES;
...OK, 0 rows affected, whatever...
mysql> ^D
Now you should do this, at the shell prompt:
$ mysqladmin -uroot -p shutdown
Password: ******** (you type in P4s$word, of course)
Now start the server up normally (e.g., sudo mysql.server start), and try
to connect like this:
$ mysql -uroot -p test
Password: ********
Welcome, blah, blah.
mysql> show databases;
...OK, blah, blah...
Now you add yourself as a user (you don't want to be using 'root' all of
the time, right?) using the same GRANT command. Add other users. Look
at the manual section for GRANT because it has lots of examples and is
very helpful.
Tim
P.S. It'd have been helpful if you'd told us what MySQL you downloaded
(RPM of 3.22.29, etc.), and the *exact* commands you used to install it
(not just "it seemed to install okay").