View Full Version : HELP Can't install MySql & PHP!
risul 12-27-2000, 11:45 PM Hi,
I've been reading all there's to read about installing MySql and php on my Raq3. I red the instrctions provided by eva2000, but I must admin.. I AM CONFUSED!
The Cobalt KB says something, peple here at WebHostingLink are saying something else, members of SitePointForum are saying something else. I have also red the article about installing MySQL/PHP at http://www.webmasterbase.com/article.php?aid=228&pid=44.
I need someone to give me an easy direction about how to install these softwares.
Please, can anyone help??
yeah, i would like something like this too. i dont want to resort to like 4 different resources to install these 2 things. thats why i suggested someone write up a how-to raq3 info page :)
syanet 12-28-2000, 12:20 AM Right here:
http://www.sitepointforums.com/showthread.php?threadid=12816
risul 12-28-2000, 12:54 AM Originally posted by syanet
Right here:
http://www.sitepointforums.com/showthread.php?threadid=12816
Maybe I'm stupid.. but I'm still confused! I just need a simple step by step instruction, the page you have referred to is not making any sense to me!
syanet 12-28-2000, 01:05 AM That's what I though at first too (I was igsites). Just simply type in exactly what PeterW says to.
(SH)Saeed 12-28-2000, 02:15 AM MySQL
To install MySQL simply go to your admin control panel, go to the install software page.. copy/paste the below url in the URL box and press install pkg.
http://pkg.nl.cobalt.com/i386/RaQ3-RaQ4-MySQL-3.22.32-1.pkg
PHP4
Simply go to http://www.php.net and download the latest version of PHP4. Upload it to your box, do "gzip -d phpfilename", then do "tar -xvf phpfilename". A PHP directory should be created now, do "cd PHPdir" and then "pico INSTALL". Follow the instructions.
You can also use lynx to download PHP directly to your box. type "lynx" then press "g" and then type the full url to the php file. Then I think you press "d" and then you select save file and then enter. Then you do "q" and after that "y" to quit lynx.
You can also find a lot of information on this board on how to edit the .conf files etc..
good luck,
Saeed
:look:
c0bra 12-28-2000, 04:20 AM Here are instructions for installing a MySQL source distribution and PHP4. I installed the MySQL package file on a RAQ4 a couple of months ago and found it missing a number of files needed to install certain perl modules we use.
## installation mysql
echo "mysql:x:101:103:MySql User:/usr/local/mysql:">>/etc/passwd
echo "mysql:x:103:">>/etc/group
cd /root
tar zxvf mysql-3.22.32.tar.gz
cd mysql-3.22.32
./configure --prefix=/usr/local/mysql
--with-unix-socket-path=/tmp/mysql.sock --with-mysqld-user=mysql
make
make install
chown mysql.mysql /usr/local/mysql
scripts/mysql_install_db
chown -R mysql.mysql /usr/local/mysql/var
mkdir /var/lib/mysql
ln -s /tmp/mysql.sock /var/lib/mysql/mysql.sock
rm -f /usr/bin/mysql
ln -s /usr/local/mysql/bin/mysql /usr/bin/mysql
chmod 755 /usr/local/mysql/var
/usr/local/mysql/bin/safe_mysqld &
/usr/local/mysql/bin/mysqladmin -u root password 'pass'
cp support-files/mysql.server /etc/rc.d/init.d/mysql
chmod 755 /etc/rc.d/init.d/mysql
echo "/etc/rc.d/init.d/mysql start">>/etc/rc.d/rc.sysinit
## installation php4.0.3pl1 for raq3
cd /root
tar zxvf php4.0.3pl1.tar.gz
cd php-4.0.3pl1
./configure --with-mysql --with-apxs
make
make install
cd /etc/httpd/conf
pico srm.conf
## add to srm.conf:
DirectoryIndex index.html index.htm index.shtml home.html home.htm index.php
^^^^^^^^^^^^
## you can also add index.php4 and index.phtml there if you want..
AddType application/x-httpd-php .php .php4 .phtml
## save file
pico httpd.conf
## change the php4 LoadModule, thats allready added to httpd.conf:
LoadModule php4_module /usr/lib/apache/libphp4.so
## save file
/etc/rc.d/init.d/httpd restart
echo "<? phpinfo(); ?>">/home/sites/home/web/test.php
## test if it works in your browser
Good luck!
okay. i caved in and finally bought a raq. now this is a question i hope someone can answer. i want to move my vbulletin over to my raq and need mysql installed. i've seen numerous different directions on this thread as well as these threads:
http://www.webhostlink.com/showthread.php?threadid=4087
http://www.sitepointforums.com/showthread.php?threadid=12816
I also noticed that MySQL is now upto build 3.23.29. Can someone please give me the best, direct installtion directions to install this? There are way too many different directions and I just want to follow one set of directions and not look all over for directions. I appreciate everyone's help. As for php, i'll figure that out later :)
-Edward- 12-29-2000, 04:47 PM Teck -
This is the version i use -
http://pkg.nl.cobalt.com/i386/RaQ3-RaQ4-MySQL-3.22.32-1.pkg
Just install it through the admin interface. Login to telnet and change the password. And its done :).
Originally posted by Technics
Teck -
This is the version i use -
http://pkg.nl.cobalt.com/i386/RaQ3-RaQ4-MySQL-3.22.32-1.pkg
Just install it through the admin interface. Login to telnet and change the password. And its done :).
thanks technic. are there disadvantages for running an older build of mysql? anyway, i found another page with directions people claim to have worked flawlessly. anyone comfirm?
http://www.webmasterbase.com/article.php?aid=228&pid=44
Chicken 12-29-2000, 05:04 PM LOL, that's the URL in the first message! This thread seems to be coming around full circle and looping a bit. Really you have a few ways of doing it with various versions. Pick the one you feel most comfortable with.
doh, i've seen so many threads about installing it that i forget which one i visited. i really dont care what way i do it. i'm comfortable with using the shell since i'm a unix guy but i'm looking for straightforward, to the point directions. if i have to resort to installing it off the cp using technics way, i can do it that way too.
risul 12-29-2000, 05:38 PM Hello guys,
Thanks for trying to help me out understanding how to install MySQL/PHP. After I had tried to install MySQL manually for 2 days (and messed up the whole installation) I had to delete all the files that had been installed by the program. I was thinking of not using Cobalt .pkg which is found at http://www.webmasterbase.com/article.php?aid=228&pid=44.
I had to pay 4WebSpace US $100 to get a new account.
Now this is my conclusion:
1. Back up your server before doing anything
2. Use the .pkg file provided by Cobalt http://pkg.nl.cobalt.com/i386/RaQ3-RaQ4-MySQL-3.22.32-1.pkg. This will install MySQL in 2 min.
3. Telnet your account and connect to MySQL, then change the password.
teck, please post how you install PHP (the safest/easiest way)!!
I have been in web designing for couple of years, and do not have any experiences in maintaining a server. I didn't imaging this would be such a pain.. but I'm learning.
actually risul i didnt charge you but dont do it again :)
Steve
risul 12-29-2000, 06:13 PM Thanks Steve,
You made my day (more to spend on New Years Eve ;-)
This is what I call VERY GOOD SERVICE!!
Thumbs UP!
i think i'll do it through the admin interface. i dont want to *@#$ things up :)
risul 12-29-2000, 07:32 PM Hi,
I'm trying to change my password for MySQL. When I try to uset any mysqladmin command, I get:
mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/var/lib/mysql/mysql
.sock' (111)'
Check that mysqld is running and that the socket: '/var/lib/mysql/mysql.sock' ex
ists!
Any idea what the problem might be?? I've installed the .pkg from Cobalt. I've red about using safe_mysqld & command, but I don't know where the mysql-directory is!!
-Edward- 12-29-2000, 07:35 PM same problem i had type this at the command prompt -
safe_mysqld
Youll find that starts mysql.
risul 12-29-2000, 07:50 PM Getting this:
[root@www /]# safe_mysqld
Starting mysqld daemon with databases from /var/lib/mysql
mysqld daemon ended
[root@www /]# mysql
ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/m
ysql.sock' (111)
[root@www /]# mysqladmin -p ping
Enter password:
mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/var/lib/mysql/mysql
.sock' (111)'
Check that mysqld is running and that the socket: '/var/lib/mysql/mysql.sock' ex
ists!
[Edited by risul on 12-29-2000 at 06:53 PM]
I had this exact same problem yesterday. What you'll need to do is follow the instructions in this page :
http://www.mysql.com/documentation/mysql/commented/manual.php?section=mysql_install_db
under
"Installing a second mysqld daemon doesn't work when one daemon is running"
What happens is that quite occasionally another process on your machine may be taking the usual Unix socket and block MySQLd from running, so you need to create a new one on a different Unix socket port.
risul 12-29-2000, 08:04 PM I do not understand. How could there be an another process? I mean I got this server yesterday. What I have been doing is only this MySQL installation.
Are u sure??
Anyway, thanx.. I'll take a look at the manual :-)
okay, i installed mysql using the fast, easy, pkg file. now what do i do now? do i just telnet in and type:
safe_mysqld
?
risul 12-29-2000, 09:41 PM Seen the manual, but it this section is for having two installations of mysql!!
Can anyone help me close the mysql server and maybe reboot it. Is this going to help??
risul, i get the same problem...i just rebooted my machine and i think it's fixed. when i type mysql, i get:
ERROR 1045: Access denied for user: 'root@localhost' (Using password: NO)
what do i do next? i couldnt find the default installation of mysql though. it's not /usr/local/mysql - also what's the significance of safe_mysqld? the reason i ask is because after i type safe_mysql, i get:
[root@www /root]# safe_mysqld
Starting mysqld daemon with databases from /var/lib/mysql
mysqld daemon ended
then when trying to start mysql,
[root@www /root]# mysql
ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111)
someone help!
[Edited by teck on 12-29-2000 at 09:40 PM]
risul 12-29-2000, 10:41 PM I know, I think it is found at /usr/share/mysql. I have rebooted my system twice.. no help!! Let me know what happens next!!
risul 12-29-2000, 10:46 PM You should actually try safe_mysqld & (this make the MySQL server to work in system background.. i've been told). But this commend stars the MySQL server.. which is allready started but not working!!
I've tried to ask Steve (at 4WebSpace.com) for help, but he says they only provide help if they have installed MySQL!!
Do you know any way you can shut off the server and reboot (I mean MySQL server offcourse)??
(SH)Saeed 12-29-2000, 10:49 PM http://pkg.nl.cobalt.com/howto/casp_mysql_howto.html
Read the bottom of the page (Step 10) carefully!
Saeed
Originally posted by zolbian
http://pkg.nl.cobalt.com/howto/casp_mysql_howto.html
Read the bottom of the page (Step 10) carefully!
Saeed
[root@www /root]# mysqladmin -uroot -pcobalt-mysql password XXXXX
mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111)'
Check that mysqld is running and that the socket: '/var/lib/mysql/mysql.sock' exists!
[root@www /root]#
no luck for me :(
risul 12-29-2000, 10:57 PM [root@www mysql]# mysqladmin -uroot -pcobalt-mysql password NEW-PASSWORD
mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/var/lib/mysql/mysql
.sock' (111)'
Check that mysqld is running and that the socket: '/var/lib/mysql/mysql.sock' ex
ists!
[root@www mysql]#
Why "pccobalt" actually?? This is not the ODBC connection we are trying to install!
Thanks for your help!
try:
killall mysql
and
killall safemysqld
then try to restart mysql. it should work. now i'm gonna try to change the pwd.
still no luck over here. is there an easy way to uninstall the pkg file? i want to start over from scratch, this time, doing the whole process manually but it's already installed :(
risul 12-29-2000, 11:27 PM Try this (thanks to qslack from sitepointforum):
Run the command:
kill -9 1718 1736 1738 1739
And then start the server with:
safe_mysqld &
Helped me a lot, but now I have forgetten the command for changing password!
Sorry.. I don't think the kill command will help you because this is telling about something in my server, but if you try:
1. [root@www admin]# ps aux|grep mysqld
2. Then you will get several numbers. Do this
3. kill -9 andallthenumbers you get
Try this: http://www.sitepointforums.com/showthread.php?threadid=14025.
Risul
[Edited by risul on 12-29-2000 at 10:34 PM]
this is what helped me.. i think i finally got it:
1. Shut down server (if running)
The best way to do this is locate the lock file of the running MySQL server
process. This will be called after your raq's name, not including the
domain. To find this out look at your prompt or type "cat /etc/HOSTNAME".
The bit we want is the first bit (before the first '.' in the name!). So for
example a raq called http://www.abc.com, the lock file we want will be called
http://www.pid. Now look for the lock file - typical places are
/usr/local/mysql/data or /usr/local/var. If you cant find it try typing
"find / -name http://www.pid 2>/dev/null" and see if that finds it.
If we have located the lock file type "kill `cat /path/to/www.pid`"
(omitting the double quotes, replacing the file path with whatever it really
is and leave the ` characters there!!).
If we cant find the lock file or the last command gives an error try typing
"p mysql" which should produce a list of 3 or more. Ignore any entries in
the list that look like "grep mysql". If the list is empty (bar the "grep
mysql"), mysql is not running. If its not empty, look for the process id of
the last entry (bar "grep mysql" if its there) in the list (2nd column) and
type "kill 1234" where 1234 is that process id. Type "p mysql" again to see
if the list is still there. If it is keep killing the last entry until the
list is empty - but usually it will be empty after the "first kill"!
2. Start server by-passing permissions
Look for the server file name "mysqld". It might be in
/usr/local/libexec/mysqld or /usr/local/mysql/bin/mysqld. If you have
trouble finding it try typing "find / -name mysqld 2>/dev/null" which should
find it! Type "/usr/local/mysql/mysqld --skip-grant-tables &" where
/usr/local/mysql/mysqld is where you found mysqld.
3. Connect to MySQL
Type "mysql -u root mysql" to connect to MySQL.
4. Change Password
** WARNING: This assumes you are using the default security settings and
have not tweaked them to your own use. If you have or are in doubt please
read MySQL documentation about this step **
At the "mysql>" prompt type "update user set Password=PASSWORD('newpwd')
where User='root';". Leave out the double quotes but leave in the single
quotes & semi-colon. "newpwd" is the new password you want for root. You
might want to be a bit more concise and use "update user set
Password=PASSWORD('newpwd') where User='root' and Host='localhost';".
Now type "FLUSH PRIVILEGES;" to enforce the new privileges throughout the
database(s).
5. Restart MySQL in normal mode again
Follow the steps in Step 1 to shutdown the MySQL server again. Then type
"/usr/local/mysql/bin/safe_mysqld &" to start the server back in safe/normal
mode. You should now be able to use "mysql -u root -p" and provide the new
password when prompted to connect again!
now is there anyway to tell if its correctly running?
[Edited by teck on 12-29-2000 at 11:00 PM]
risul 12-30-2000, 12:21 AM http://www.sitepointforums.com/showthread.php?threadid=14025
The reason I made my original post was because despite doing a killall of all MySQL processes I still had that 2002 error msg (couldn't connect to socket), so that's where I found the URL from MySQL.com and it worked like a gem for me.
If you follow qslack's instructions it *should* get you back up.
Domenico 12-30-2000, 07:39 AM DON'T SU !!!
Do all you did when you are a 'plain' admin! This worked for me and before that I had the same problems like you all have.
It is for security reasons that you can't connect to mysql as root. I saw that somewhere (don't know where anymore).
Try mysqladmin -uroot -pcobalt-mysql (no space between -p and password! and as an admin, not root!)
Let me know if this worked for you too.
Domenico
btw change the default password ASAP
risul 12-30-2000, 12:16 PM Because of the instructions provided by qslack, my problem is solved. Now when I ping MySQLadmin:
mysqladmin -p ping
-----> mysqlgd is alive
Thank you guys for all the help!
|