LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   mysql (https://www.linuxquestions.org/questions/linux-newbie-8/mysql-4175477376/)

officerx 09-16-2013 07:51 PM

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.

j-ray 09-17-2013 02:22 AM

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

officerx 09-17-2013 03:13 AM

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.

pan64 09-17-2013 04:00 AM

duplicate of http://www.linuxquestions.org/questi...ls-4175477362/

j-ray 09-17-2013 04:49 AM

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.

officerx 09-17-2013 04:59 PM

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

yancek 09-17-2013 05:41 PM

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.

officerx 09-17-2013 06:07 PM

Quote:

Originally Posted by yancek (Post 5029519)
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?

j-ray 09-18-2013 01:47 AM

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...

yancek 09-18-2013 07:06 PM

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.

j-ray 09-19-2013 02:58 AM

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

officerx 09-19-2013 05:56 AM

Oh I didn't know thar. Ill try it when I get home if it works ill let you know

officerx 09-29-2013 07:47 AM

J-ray. Thanks man I was able to solve the problem thanks for your help.


All times are GMT -5. The time now is 04:24 AM.