You are not logged in.

#1 2006-08-30 23:07:00

rabadash
Member
From: Seattle
Registered: 2005-04-01
Posts: 41

Trying to follow the LAMP Guide

Ok, so i've followed the lamp guide, Apache went in fine, so did php, but mysql gives me problems.  First of all, the guide tells me to "create root password for mysql" by entering in this command:

# mysqladmin -u root password 'roots_password'

I don't understand if I'm supposed change part of that to my password, or what?  so when I try to login using this line:

# mysql -u root -h Quasi -p

I have no idea what my password is.  did I set my password to "password", is it the same password as my root account?  Do I have a password at all?



Here's the part that I'm at:

Further Configuration

    * Test mysql (as root):

# mysql

    * Create root password for mysql (at terminal, as root):

# mysqladmin -u root password 'roots_password'

    * Add mysqld to the list of daemons in /etc/rc.conf (as for httpd above)

    * To login to mysql, type (at terminal, hostname as used in /etc/hosts)

# mysql -u root -h hostname -p


When I try to login to mysql by typing in:

# mysql -u root -h Quasi -p

I get this:

[root@Quasi html]# mysql -u root -h Quasi -p
Enter password:
ERROR 2003 (HY000): Can't connect to MySQL server on 'Quasi' (111)

I don't understand what's happening and/or what I'm supposed to do.  I love the fact that the LAMP guide is on the wiki, but this part seems unclear to me.

Offline

#2 2006-08-31 00:58:03

elasticdog
Member
From: Washington, USA
Registered: 2005-05-02
Posts: 995
Website

Re: Trying to follow the LAMP Guide

You don't need the <code>-h Quasi</code> in there, it will connect to the localhost by default.  The root mysql password will be different than what your machine's root password is...it's a completely separate system.  If you typed in that command verbatim, then the mysql root password should be <code>roots_password</code>, otherwise you might not have set it at all, so just try entering no password and hitting enter when it prompts you.  You can always set it once you're in by doing this:

mysql> SET PASSWORD FOR 'root'@'localhost' = PASSWORD('yourpasswordhere');
mysql> SET PASSWORD FOR 'root'@'Quasi' = PASSWORD('yourpasswordhere');

You have to enter in the two separate commands because the first sets it for local access, and the second for remote access if you wanted to get to your mysql server from a different machine.  Hope that helps...

Offline

Board footer

Powered by FluxBB