SlackwareThis Forum is for the discussion of Slackware Linux.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
As gbonvehi says, have a look at rc.mysqld in /etc/rc.d/. All is explained there in.
# Start/stop/restart mysqld.
# Copyright 2003 Patrick J. Volkerding, Concord, CA
# Copyright 2003 Slackware Linux, Inc., Concord, CA
# This program comes with NO WARRANTY, to the extent permitted by law.
# You may redistribute copies of this program under the terms of the
# GNU General Public License.
# To start MySQL automatically at boot, be sure this script is executable:
# chmod 755 /etc/rc.d/rc.mysqld
# Before you can run MySQL, you must have a database. To install an initial
# database, do this as root:
# su - mysql
# Note that step one is becoming the mysql user. It's important to do this
# before making any changes to the database, or mysqld won't be able to write
# to it later (this can be fixed with 'chown -R mysql.mysql /var/lib/mysql').
# To allow outside connections to the database comment out the next line.
# If you don't need incoming network connections, then leave the line
# uncommented to improve system security.
You will notice that the line...
is commented out above.
at the terminal as root open up pico
# pico /etc/rc.d/rc.mysqld
edit the file by placing a # before the said line.
Ctrl + x to close making sure you say yes to saving the file.
This maybe because you created the databases previously and never recreated them before trying mysql again.
Retrace your steps.
Sounds to me as though mysql is already running.
If you changed permissions on rc.mysqld to start at reboot then it will start everytime you boot your machine.
You will have to stop the running instance of mysql.
Remain as root...
make sure Skip-networking is commented out before hand.
Recreate your databases...should destroy current databases and create new ones, will also destroy any previous accounts including passwords. It will also recreate the root acount but blow away the password you previously set.
su - mysql
Now restart mysql
Now try this...no password should be required...
$ mysql -u root
If mysql starts okay - you should get the prompt
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 9
Server version: 5.0.37 Source distribution
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
Try to connect to the mysql database...and some query.
mysql> use mysql;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Coyote, that's just a warning message, mysql will run fine. If you want to avoid seeing it, you can redirect the messages to a log file or just to /dev/null.
If you want that, edit /etc/rc.d/rc.mysqld and change the line: