Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 12

Thread: Mysql

Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1


    Hi there,

    I'm trying to get mysql working. I know nothing about it except that it is a database thing. I've read this forum and am totally confused. I've started to learn WinSQL but I want to learn it on Linux.

    Do I need a server to run Mysql? What sort of server?

    I tried these commands
    mysqladmin -u root password mysqldata
    This is the result ( mysqladmin:connect to server at 'localhost' failed. Error: 'Can't connect to local MySQl server through socket '/var/run/mysql/mysql.sock (2).
    Chech that mysqld is running and the socket /var/rum/mysql/mysql.sock exists

    I also did this command before the above:
    su root, mysql -c mysql_install _db

    etc/rc.d/mysql start

    actually in the rc.d folder it is rc.mysqld

    I put the extra d in the above commands too and still there is problems.

    I would really appreciate it if someone could explain to me if I need a server and if I do which one.

  2. #2
    What are you trying to use MySQL for?

    I am by no means an expert, but typically MySQL is used to store content for web pages. If this is the case, you will need a web server with PHP enabled. Apache is a good web server. Depending on what packages you installed when you installed Slackware, you may already have Apache. You can use pkgtool to see which packages you have installed. If the Apache package is already installed, chances are PHP is installed too.

    If you want to use MySQL for storing web content, I would recommend searching these forums for threads on installing and configuring Apache with PHP. There are a lot of threads that can explain the process better than I can.

    Once you get Apache and PHP working, you can use PHPmyAdmin to administer your MySQL databases.

    I'm pretty new at this myself, but I just setup a web server with Apache, PHP and MySQL so I can provide some help.

  3. #3

    MySQL is a SQL server that comes with Slackware. It appears that it is not running on your box, hence the message: Can't connect to local MySQl server
    and the hint: Check that mysqld is running

    You can start it manually (you were close) but an easy way to get it going is to make the startup script executable:
    chmod a+x /etc/rc.d/rc.mysqld
    then reboot. This way it will be running each time you boot. You should see a message near the end of the boot sequence that mysqld is running.

    The d on the end of mysqld means it is a daemon (basically a program that runs in the background, waiting for something to happen, like for a client to connect, and then does something.)

    Now you should be able to connect to your MySQL server using the mysqladmin and mysql programs. Depending on the security settings, etc, you may be able to use them to connect to other MySQL servers on other machines.

    Hope this helps. I have found MySQL to be very stable and robust. I use it to store member information and web content. Homework: look up daemon on, also look into postgreSQL if you don't like MySQL.

    Good luck.,

  4. $spacer_open
  5. #4

    Whats the output of

    ps -ef | grep mysql
    This will tell us if its running or not. After that is decided we can work on the connection issue. There are two ways to connect, through the socket like its trying over tcp.


  6. #5
    Just Joined! volomir's Avatar
    Join Date
    Jul 2006


    well, none of you gave the correct solution

    su - mysql

    and after that
    /etc/rc.d/rc.mysqld start

    another way ( if that doesn't work for you is changing the ownerships)
    here's what i did with a server after installing the tables, and the mysql daemon wouldn't start

    chown mysql.mysql /var/lib/mysql
    chmod 770 -R /var/lib/mysql
    chown mysql.mysql /var/run/mysql
    chmod 770 -R /var/run/mysql
    /etc/rc.d/rc.mysqld start

    these methods should do the trick

  7. #6

    A mysqld process already exists

    Hi Volomir,

    Sorry I have taken so long to get back to this question of mine and your help.

    I started mysqld by typing: /etc/rc.d/rc.mysqld start

    Now the prompt reads: A mysqld process alread exits.

    What do I do now?
    How do I actually get into sql now and start to create a database?
    Forgive me for being so silly and dimwitted.
    Do I have to have a server to create a database?

    Your help is most appreciated.


  8. #7
    Did you try typing "mysql' at prompt . It apears your server has already started so that is the way you "start" the client side and use it.
    mysql -u user -ppassword
    and see what will happen

  9. #8
    Hi Igi_BG

    Ok, I type mysql at the prompt and here's what I get.

    Welcome to MySQL monitor. Commands end with .....
    Your MySQL connection id is 3 to server version 5.0.27

    type help ....


    I can type anything in there but nothing happens. How do I start making tables or querying a database from here? How do I install a database?

    Thanks very much for your help mate!!! It is most appreciated!! p.s. I'm trying this on Fedora.


  10. #9
    OK so you have a running mysql server and you can start mysql client. Now you have to read . The "sql language" is quite simple. Search for tuts on the net or get the BIG MYSQL reference manual - it is all in it.

    Good luck.

    It doesn't matter it is on Fedora

  11. #10
    Hi Igi_BG

    I got it working. I created the database, the tables. GREAT !! Thanks so much for your help.

    I spent some time and did some searching and reading and it's working.

    I no doubt will have more questions in the future.

    Thanks again

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts