LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-16-2013, 08:51 PM   #1
officerx
Member
 
Registered: Sep 2013
Distribution: centOS, backtrack linux R3, windows 7
Posts: 59

Rep: Reputation: Disabled
mysql


Hello am new to linux's lamp environment.

I have asked my friend to set an lamp environment for my centos 6 laptop and I think the are too many mysql installations one works fine but the other one gives an error message like cannot connect to mysql.sock (2) and I would like to use that installation because it works with my phpadmin program so what should I do?

I have tried fixing the error on my other lamp install which works with hphpadmin program through using old threads but I have failed.
 
Old 09-17-2013, 03:22 AM   #2
j-ray
Senior Member
 
Registered: Jan 2002
Location: germany
Distribution: ubuntu
Posts: 1,532

Rep: Reputation: 132Reputation: 132
If there is 1 mysql daemon already running then you cannot start a 2nd one that uses the same socket. This socket is the connection point to the mysql server. But actually I'm not sure whether there is a mysqld running so check this command in bash:
ps -e | grep mysql
If it returns a process then mysqld is running. If not you simply have to start the server. The error message you mentioned points to that...

Cheers, j
 
1 members found this post helpful.
Old 09-17-2013, 04:13 AM   #3
officerx
Member
 
Registered: Sep 2013
Distribution: centOS, backtrack linux R3, windows 7
Posts: 59

Original Poster
Rep: Reputation: Disabled
correct

Yes you are correct if I start one sql and try the other I receive the message other sql daemon already running cannot start. But I would love to use the other sql setting because it has a GUI and the other doesn't so I was wondering if the is a way to make the other sql setting to work with my phpadmin GUI.
 
Old 09-17-2013, 05:00 AM   #4
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian i686 (solaris)
Posts: 8,122

Rep: Reputation: 2270Reputation: 2270Reputation: 2270Reputation: 2270Reputation: 2270Reputation: 2270Reputation: 2270Reputation: 2270Reputation: 2270Reputation: 2270Reputation: 2270
duplicate of http://www.linuxquestions.org/questi...ls-4175477362/
 
Old 09-17-2013, 05:49 AM   #5
j-ray
Senior Member
 
Registered: Jan 2002
Location: germany
Distribution: ubuntu
Posts: 1,532

Rep: Reputation: 132Reputation: 132
You can adjust phpMyAdmin according to your needs or stop the first mysql server before starting the second one. Configuring phpMyAdmin is not too difficult so I suggest to give that a try.
 
Old 09-17-2013, 05:59 PM   #6
officerx
Member
 
Registered: Sep 2013
Distribution: centOS, backtrack linux R3, windows 7
Posts: 59

Original Poster
Rep: Reputation: Disabled
killed the lampp setup with phpadmin

R jay I have killed the lampp setup with the easyphpadmin GUI.

If I may ask another question.

I am a php developer and I was working on windows with aptana and wamp so am moving my project to my linux enviroment
I was wondering how do I open my php files to test them out on linux.? On windows I would just type localhost and the directory of the php file I want to test
 
Old 09-17-2013, 06:41 PM   #7
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 6,872

Rep: Reputation: 1249Reputation: 1249Reputation: 1249Reputation: 1249Reputation: 1249Reputation: 1249Reputation: 1249Reputation: 1249Reputation: 1249
Quote:
On windows I would just type localhost and the directory of the php file I want to test
The same on Linux. The Document Root for Apache is usually in the /var/www/htdocs or html directory. So you would put your file there or in a sub-directory and if you have it in a sub-directory, you need the full path.
 
Old 09-17-2013, 07:07 PM   #8
officerx
Member
 
Registered: Sep 2013
Distribution: centOS, backtrack linux R3, windows 7
Posts: 59

Original Poster
Rep: Reputation: Disabled
Question

Quote:
Originally Posted by yancek View Post
The same on Linux. The Document Root for Apache is usually in the /var/www/htdocs or html directory. So you would put your file there or in a sub-directory and if you have it in a sub-directory, you need the full path.
I tried moving my folder containing my php files to

/var/www/html but it seems like it doesn't want to move them I even tried moving them using terminal under root it won't move them to that directory or am I doing something wrong?
 
Old 09-18-2013, 02:47 AM   #9
j-ray
Senior Member
 
Registered: Jan 2002
Location: germany
Distribution: ubuntu
Posts: 1,532

Rep: Reputation: 132Reputation: 132
In bash you have to
cd /etc/apache2
grep DocumentRoot ./*

This will probably tell where you have to place your files. The DocumentRoot is the directory where the server looks for files. Could be
"/srv/www/htdocs" on CentOs but I don't know...
 
Old 09-18-2013, 08:06 PM   #10
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 6,872

Rep: Reputation: 1249Reputation: 1249Reputation: 1249Reputation: 1249Reputation: 1249Reputation: 1249Reputation: 1249Reputation: 1249Reputation: 1249
Quote:
I even tried moving them using terminal under root it won't move them to that directory or am I doing something wrong?
Don't know. You should be able to do that since these files are on the same machine. What are the permissions and owner:group for that directory, /var/www/html? Use the ls -l command to get the info.
 
Old 09-19-2013, 03:58 AM   #11
j-ray
Senior Member
 
Registered: Jan 2002
Location: germany
Distribution: ubuntu
Posts: 1,532

Rep: Reputation: 132Reputation: 132
what was the command you used in bash? If you use cp be aware you have to use the -R flag to copy a directory. Otherwise it skips directories
 
1 members found this post helpful.
Old 09-19-2013, 06:56 AM   #12
officerx
Member
 
Registered: Sep 2013
Distribution: centOS, backtrack linux R3, windows 7
Posts: 59

Original Poster
Rep: Reputation: Disabled
Oh I didn't know thar. Ill try it when I get home if it works ill let you know
 
Old 09-29-2013, 08:47 AM   #13
officerx
Member
 
Registered: Sep 2013
Distribution: centOS, backtrack linux R3, windows 7
Posts: 59

Original Poster
Rep: Reputation: Disabled
J-ray. Thanks man I was able to solve the problem thanks for your help.

Last edited by officerx; 09-29-2013 at 08:48 AM. Reason: spelt name wrongly.
 
  


Reply

Tags
mysql, phpmyadmin


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Can MySQL log on via SSH/bash? mysql:x:27:101:MySQL Server:/var/lib/mysql:/bin/bash Ujjain Linux - Newbie 2 04-24-2009 03:21 PM
yum install php-mysql fails with mysql 5.1 - "Error: mysql conflicts with MySQL" rebelde Linux - Software 2 03-13-2009 11:32 AM
mysql error Can't connect to local MySQL server through socket '/var/lib/mysql/mysql. SpellChainz Linux - Newbie 1 06-23-2007 04:35 PM
mysql error Can't connect to local MySQL server through socket '/var/lib/mysql/mysql. Dannux Linux - Software 3 03-24-2006 09:44 AM


All times are GMT -5. The time now is 10:47 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration