Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

mysql question 1

Status
Not open for further replies.

sonun

IS-IT--Management
Dec 26, 2001
384
US
After I went through the following steps successfully,
(The previous problem I had regarding inability to untar files was solved by downloading stuff on that computer where it was untarred. Before that I was trying to untar stuff downloaded on to a samba share !!!)
shell> groupadd mysql
shell> useradd -g mysql mysql
shell> gunzip < mysql-VERSION.tar.gz | tar -xvf -
shell> cd mysql-VERSION
shell> ./configure --prefix=/usr/local/mysql
shell> make
shell> make install
shell> scripts/mysql_install_db
shell> chown -R root /usr/local/mysql
shell> chown -R mysql /usr/local/mysql/var
shell> chgrp -R mysql /usr/local/mysql
shell> cp support-files/my-medium.cnf /etc/my.cnf
for
shell> /usr/local/mysql/bin/safe_mysqld --user=mysql &
I get,
[1] 15387
[root@calamity /root]# Starting mysqld daemon with databases from /usr/local/mysql/var
020314 09:47:12 mysqld ended


[1]+ Done /usr/local/mysql/bin/safe_mysqld
then when I try to,
./mysqladmin -u root password 'passwd'
I get,
./mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)'
Check that mysqld is running and that the socket: '/tmp/mysql.sock' exists!

Please advise. I have many more things to do including setting up php and apache. Would also appreciate links to those as well.

Also how can I specify RPMs to install to a particular directory like /usr/local/mysql. There was an option,
rpm --dbpath <path>. So could I do a,
rpm -Uvh --dbpath </usr/local/mysql> rpm
then ??????????????????????????????????

Thanks.
 
as an update,
I did rm --rebuild of the source rpm which created (I guess!) these files in the /usr/src/redhat/RPMS.
I did a rpm -Uvh on all, MySQL-devel-3.23.49-1.i386.rpm
MySQL-3.23.49-1.i386.rpm MySQL-Max-3.23.49-1.i386.rpm
MySQL-shared-3.23.49-1.i386.rpm

but,
MySQL-bench-3.23.49-1.i386.rpm

as there were some dependency probs.

Now when I try to start safe-mysqld, it says process is running.

when I try to mysqladmin -u root password 'newpass', I get,
./mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)'
Check that mysqld is running and that the socket: '/tmp/mysql.sock' exists!

Now on the other machine where I was trying the source code, there is error.log written when I tried to start the safe-mysqld,
020314 14:23:55 mysqld started
020314 14:23:55 Can't start server: Bind on TCP/IP port: Address already in use020314 14:23:55 Do you already have another mysqld server running on port: 3306 ?
020314 14:23:55 Aborting

020314 14:23:55 /usr/local/mysql/libexec/mysqld: Shutdown Complete

020314 14:23:55 mysqld ended


?????????????????????????????????????????????/

Thanks,
~ Nishant

 
Hi,

If you installed from rpm, you should use the sysv init script to start / stop (part of it calls /usr/bin/safe_mysqld ).

# /etc/rc.d/init.d/mysqld start
# /etc/rc.d/init.d/mysqld stop
# /etc/rc.d/init.d/mysqld restart

etc..

As a precaution before starting you can try killall to get rid of any stragglers from a manual start :

# killall -9 myslqd

You can see if its listening on port 3306 like this :

# /usr/sbin/lsof -i TCP:3306

Hope this helps
 
Thanks. That was as simple as that.
Now I as trying to set-up Apache, SSl, Mysql, and PHP and in this quest I was looking for the reclusive rsaref20.tar.Z file unsuccessfully so far. Have any idea where I can find one.
Any links, how-to's, tutorials to apache, ssl, rsaref, and related stuff would be greatly appreciated.
Thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top