HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Installation/Configuration (http://www.howtoforge.com/forums/forumdisplay.php?f=27)
-   -   Help Installing Ispconfig please (http://www.howtoforge.com/forums/showthread.php?t=61142)

roe74979 26th March 2013 01:34

Help Installing Ispconfig please
 
Hello all,

I am folling this tutorial..http://www.howtoforge.com/perfect-se...ot-ispconfig-3 and I ge to the part that says:.

Code:

php -q install.php
I get to the bottom to

Code:

MySQL charset [utf8]: <-- ENTER
and I get

Code:

Unable to connect to the specified MySQL server Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
I've done a bit of research before posting here, and it says to mess with the .cnf file and change the part about client. but that didnt work either. so any help that I can get would be appreciated becuase I need ISPConfig up and running soon.

thanks

researcher7 26th March 2013 09:31

Is mysql running?

What is the output of
Code:

ps aux | grep mysql | grep -v grep
Did you set your mysql root password before you started install?
If not, you need to do so.

roe74979 26th March 2013 14:41

Thanks for the reply,

when I put in the code you gave me, nothing happens.

I did put in a root password.

I honestly dont know if MYSQL is installed. still new to the Linix world of OS. Anyway to check to see if its installed?

thanks

researcher7 26th March 2013 16:13

Thanks for the update.
OK, we have 2 possibilities, MySQL is installed but not running, or it was not installed.

If you have followed step 12 as specified in the article, and did not see any errors, then it could be installed but not running.
In this case, run the following.

Code:

/etc/init.d/mysqld start
You should see something like.

mysql start/running, process xxxx

You can change/specify root password by issuing the following:

Quote:

sudo dpkg-reconfigure mysql-server-5.5
The service would be stopped and you will be prompted to enter an new root password.


If you get an error, file not found, ..etc when running /etc/init.d/mysqld start then we have to assume that MySQL was not installed, or was removed.

In that case, do the following.

Quote:

apt-get install postfix-mysql mysql-client mysql-server dovecot-mysql sudo
When asked to enter root password, choose and enter one.

Now you can use that root password when you install ISP Config.

If you see other issues, please post the output as you see it in your ssh window.

roe74979 26th March 2013 16:29

thank you for your response,

I had to follow cod 2, because I did not do step 12 of the instructions because I just wanted ISPconfig, and not the rest.

so I installed MYSQL as instructed via your code. now I get to the same step

Code:

MySQL charset [utf8]: <-- ENTER
and i'm now getting this error:

Code:

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysqld.sock' (2)
ERROR: Unable to load SQL-Dump into database table.

Edit: Could this have anything to do with the fact that i'm doing this remotely from school to my home PC?

thanks

researcher7 26th March 2013 16:44

Quote:

Originally Posted by roe74979 (Post 294749)
thank you for your response,

I had to follow cod 2, because I did not do step 12 of the instructions because I just wanted ISPconfig, and not the rest.

so I installed MYSQL as instructed via your code. now I get to the same step

Code:

MySQL charset [utf8]: <-- ENTER
and i'm now getting this error:

Code:

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysqld.sock' (2)
ERROR: Unable to load SQL-Dump into database table.

Edit: Could this have anything to do with the fact that i'm doing this remotely from school to my home PC?

thanks

It should not have anything to do with your connection, once you are connected successfully via ssh, your commands are running on the server you are connected to.

ISP Config configuration from that link needs mysql installed and running.
At this point it is either not running or needs to listen on all IPS.
Edit your /etc/mysql/my.cnf and comment out the following line.
bind-address = 127.0.0.1

Something like

Code:

nano /etc/mysql/my.cnf
And then make sure
Code:

#bind-address          = 127.0.0.1
Use Ctrl + O and then Enter to save, Ctrl + x to exit.

Restart mysql

Code:

/etc/init.d/mysql restart
Check if it is running/listening.

Code:

netstat -tap | grep mysql
Then
Code:

ps aux | grep mysql | grep -v grep
Both should not return empty responses. If they did, then mysql is not running and we need to find out why.

roe74979 26th March 2013 17:08

Thanks for the response,

Ok, so I edited the my.cnf wilfe and there was already a

Code:

#bind-address          = 127.0.0.1
,but there wasn't a #, so I added one before "bind"

I went to restart using

Code:

/etc/init.d/mysql restart
and it gave me this

Code:

student@student-desktop:~$ /etc/init.d/mysql restart
Rather than invoking init scripts through /etc/init.d, use the service(8)
utility, e.g. service mysql restart

Since the script you are attempting to invoke has been converted to an
Upstart job, you may also use the stop(8) and then start(8) utilities,
e.g. stop mysql ; start mysql. The restart(8) utility is also available.
stop: Rejected send message, 1 matched rules; type="method_call", sender=":1.72" (uid=1000 pid=10598 comm="stop mysql ") interface="com.ubuntu.Upstart0_6.Job" member="Stop" error name="(unset)" requested_reply="0" destination="com.ubuntu.Upstart" (uid=0 pid=1 comm="/sbin/init")

I continued on with the rest of the codes, just incase they mean something.

Code:

(Not all processes could be identified, non-owned process info
 will not be shown, you would have to be root to see it all.)
tcp        0      0 localhost:mysql        *:*                    LISTEN      -

Code:

student@student-desktop:~$ ps aux | grep mysql | grep -v grep
mysql    7225  0.1  0.5 552100 44492 ?        Ssl  10:16  0:03 /usr/sbin/mysqld


researcher7 26th March 2013 17:30

Quote:

Originally Posted by roe74979 (Post 294751)

I continued on with the rest of the codes, just incase they mean something.

Code:

(Not all processes could be identified, non-owned process info
 will not be shown, you would have to be root to see it all.)
tcp        0      0 localhost:mysql        *:*                    LISTEN      -

Code:

student@student-desktop:~$ ps aux | grep mysql | grep -v grep
mysql    7225  0.1  0.5 552100 44492 ?        Ssl  10:16  0:03 /usr/sbin/mysqld


So mysql is running. That is good.
Now since it complained about restarting via the old /etc/init.d script, go ahead and restart it.

Code:

service mysql restart
Now make sure that you can connect to mysql as root.

Code:

mysql -u root -p
If you have specified a root password when installing mysql, enter it now, and should be connected to mysql and your prompt should be looking like this:

mysql>

Type:
Code:

exit
And then Enter, and you should be disconnected from myql.

Now you have verified that mysql is running and your mysql root password works, run the install script again for ISP Config.

Note: Password for mysql root is not necessarily the same password for your Linux root, and not recommended to be the same. Make sure it is a strong password.

If you are getting errors like
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)

After you provide the password when you try to connect to mysql, please let me know, at that point, we need to reset/specify your mysql root password.

roe74979 26th March 2013 17:37

after running:

Code:

mysql -u root -p
I got this error:

Code:

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysqld.sock' (2)

researcher7 26th March 2013 17:53

OK, at this point, we have established that mysql is running, but the client cannot connect to it.

Few things to check.

Does /tmp/mysql.sock exist?

To find out run:

Code:

ls -1lah /tmp/mysql.sock
If you see an error message, then for some reason, the file was removed.

Run,

Code:

touch /tmp/mysql.sock
Restart mysql

Code:

service mysql restart
try connecting again.

If you still get the same error message, then we need to verify that the socket file location specified in your /etc/my.cnf (depending on your configuration, that file may also exist at /etc/mysql/my.cnf) is the same for both the service and the client.

Code:

nano /etc/my.cnf
Or
nano /etc/mysql/my.cnf

Check [mysqld] section.

You should find
Code:

socket      = /tmp/mysqld.sock
Check the [client] section, make sure the same exists.

If not, change according.

The general rule is the client section to match what the [mysqld] section has for the socket file location, so if it is
/tmp/mysqld.sock, then client section should have /tmp/mysqld.sock
If it is something else, like /var/run/mysqld/mysqld.sock then client should have the same.

Ctrl + o and then Enter to save.
Ctrl + x to exist nano.

If you have made any changes, restart mysql, and try again.


All times are GMT +2. The time now is 20:48.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.