homepage Welcome to WebmasterWorld Guest from 54.167.171.186
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Hardware and OS Related Technologies / Linux, Unix, and *nix like Operating Systems
Forum Library, Charter, Moderators: bakedjake

Linux, Unix, and *nix like Operating Systems Forum

    
Problem after migrating to Xampp
mack




msg:4121461
 9:52 pm on Apr 24, 2010 (gmt 0)

I had the default installations of php mysql and apache but changed it around to use xampp. Main reason being having everything in the one folder so it could all be backed up as one, and also for rsynking between machines.

But I hit a problem. I used the package manager to remove the server and db then downloaded and installed Xampp. The install went fine and i was up and running in next to no time. The problem came when i tried to import my largest SQL file.

Its 400+ meg so there was no way phpMyAdmin would be able to handle it. I went into shell and when I try from there it gives the following error...

root@mack-desktop:/opt/lampp/bin# mysql -uroot -ppassword -h localhost uk < /home/mack/Documents/Websites/example/data/datafile.sql
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)


It seams as if mysql client is still trying to reference the old install.

Can this be altered in a config file?

Mack.

 

lammert




msg:4121594
 8:57 am on Apr 25, 2010 (gmt 0)

The connection to the MySQL server is controlled in the my.cnf file. You can find it probably in your /etc directory. The [mysqld] section contains the settings used by the server when it starts up. The [client] section contains the settings for the mysql command-line client. In both sections there is a line:

socket=some path

These two lines in the [mysqld] and [client] section must be the same. Otherwise the client is unable to find the server.

mack




msg:4121641
 1:38 pm on Apr 25, 2010 (gmt 0)

Lammert, thank you very much for your reply.

Now it gets interesting. The default Ubuntu install of mysql is Root > etc > mysql and that folder is still present. It doesn't have the actual DB server but it does have my.cnf

Because I removed mysql and them reinstalled in another location opt > lampp... the paths will be totally wrong. I did however install mysql client through the package manager so it will almost certainly be trying to use the default my.cnf file.

Should I un-install mysql client and do a manual install from source, or just edit the default my.cnf file.

Thanks again.

Mack.

lammert




msg:4121649
 1:56 pm on Apr 25, 2010 (gmt 0)

The MySQL server and the client are two different software packages and they work independent of each other. You should be fine editing the my.cnf which is used by the client. You may have two my.cnf files now on different locations because your XAMPP installation uses the /opt tree, while the client is /etc oriented.

The client doesn't need to know the directory path where the server or the databases are located. All it does is connect to the server through a socket or through a network connection, depending on the settings in the my.cnf file.

mack




msg:4121655
 2:12 pm on Apr 25, 2010 (gmt 0)

Thank you very much, issue now resolved.. removed the default my.cnf and copied the Xampp version to the location of the default file. Now works fine!

Thanks again.

Mack.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Hardware and OS Related Technologies / Linux, Unix, and *nix like Operating Systems
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved