+ Post New Thread
Results 1 to 2 of 2
*nix Thread, Ubuntu & MySQL my.cnf file in Technical; Hi Everyone, I have just installed Ubuntu and setup Apache, PHP and MySQL using the Terminal, I cannot seem to ...
  1. #1
    Steven's Avatar
    Join Date
    Apr 2007
    Location
    Morecambe
    Posts
    114
    Thank Post
    6
    Thanked 1 Time in 1 Post
    Rep Power
    0

    Ubuntu & MySQL my.cnf file

    Hi Everyone, I have just installed Ubuntu and setup Apache, PHP and MySQL using the Terminal, I cannot seem to get MySQL working at all nothing is recognising it, I cant find 'bind-address = 127.0.0.1' in the my.cnf file to change to the servers IP like websites are telling me

    Any Ideas?

    Thanks Alot!

  2. #2
    bmike78's Avatar
    Join Date
    Aug 2010
    Location
    Davenport, IA
    Posts
    4
    Thank Post
    0
    Thanked 2 Times in 2 Posts
    Rep Power
    0
    Some output of the errors you're receiving would be helpful in fixing the problem.

    Run /etc/init.d/mysql and post the results. Also post your mysql config file for us to look at.

    I have this in my my.cnf file:

    #
    # Instead of skip-networking the default is now to listen only on
    # localhost which is more compatible and is not less secure.
    bind-address = 127.0.0.1

    If you don't have this in your my.cnf file, you can just add it in and then try restarting mysql

    If it's running, then you'll see that if you run netstat and grep for 3306, which is the default port for mysql:

    root@ubuntu-monitoring:/etc/mysql# netstat -an | grep 3306
    tcp 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN

    You'll also be able to telnet to it and get some kind of response:

    root@ubuntu-monitoring:/etc/mysql# telnet 127.0.0.1 3306
    Trying 127.0.0.1...
    Connected to 127.0.0.1.
    Escape character is '^]'.
    @
    5.0.75-0ubuntu10.5!/+*/O~PR,*xD&1c!vT!Cn

    I would suggest keeping it just bound to 127.0.0.1 if you're just going to query it from Apache if it's hosted on the same machine. No sense in having it listen on the public interface unless you want outsiders trying to connect to it.

SHARE:
+ Post New Thread

Similar Threads

  1. MYSql - Script batch create users & dbs
    By peterdoherty in forum How do you do....it?
    Replies: 9
    Last Post: 15th January 2014, 10:06 AM
  2. Server 2003 - Seperate severs for Apache, MySql & PHP
    By danIT in forum Windows Server 2000/2003
    Replies: 1
    Last Post: 11th May 2010, 09:13 AM
  3. [Ubuntu] File server
    By timlineuk in forum *nix
    Replies: 9
    Last Post: 12th January 2010, 12:14 PM
  4. Firewall & MySQL Setup
    By karldenton in forum Windows Server 2000/2003
    Replies: 12
    Last Post: 23rd April 2009, 02:29 PM
  5. using mysql & php on a W2K SP2 server
    By beeswax in forum Web Development
    Replies: 44
    Last Post: 29th June 2006, 08:54 AM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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