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!

Hi, I am very new to linux and I

Status
Not open for further replies.

sucram

Programmer
May 23, 2001
75
GB
Hi,

I am very new to linux and I am trying to get the MySQL sever to start every time I reboot.
I was told to edit the inetd.conf file, this is the line I entered.
mysql stream tcp nowait root /usr/sbin/tcpd /usr/local/mysql/support-files/mysql.server start

The file says to have everything in the following way:
<service_name> <sock_type> <proto> <flags> <user> <server_path> <args>

I basically just copied the syntax from other lines in the file. I have no idea what it all means really.

I would greatly appreciate any help on how to to this.

Thanks,
Marcus

 
Hi,











What distribution/version of linux are you using ? inetd is a 'super daemon' that listens on certain IP ports and launches associated servers when traffic is received - for example it usually listens on port 23 and launches a telnet process when it receives a connection. The first entry indirectly indicates the port number as defined in /etc/services. If you do :









cat /etc/services | grep mysql









You will see mysql uses port 3306 .









Most modern linux distros, however, no longer use inetd - they use its replacement xinetd - the extended inetd. (Main exception is debian). So, sometimes people read stuff that says they should configure inetd but its no longer used on their system.









Anyway, it all depends really on your distro and where you got the mysql code from. For example on a current redhat system with mysql rpms obtained from redhat themselves you would just do as root :









/sbin/chkconfig --level 345 mysqld on









Thats because redhat provide sysv 'init scripts' to faciliate starting mysql at boot, etc.









Otherwise it might be something like :









/usr/local/mysql/bin/safe_mysqld &









You can always put a command like the above in your /etc/rc.d/rc.local script file because that's run at every boot and is intended for local customisation.









Hope this helps














 
Thanks for that.

I am running suse 7.2.
I put the safe_mysqld command into the /etc/rc.d/rc.local script file but nothing happened. The file did not exist before. There seems to be a directory for each run level called rcX.d where X is the run level


This is the result of: cat /etc/services | grep mysql
mysql 3306/tcp # MySQL
mysql 3306/udp # MySQL

The mysql server will not start from the command line with the mysqld command but it does with the safe_mysqld command, is this right.

Thanks,
Marcus

 
Thank you very much for that ifincham, that did it.
It didn't work first time though the exact lines I added to the boot.local file were:

cd /usr/local/mysql/
/usr/local/mysql/bin/safe_mysqld
cd /

For some reason you have to be in the mysql home directory before it will work the same is true from the command line.

Thanks again,
Marcus

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top