Page 2 of 2 FirstFirst 12
Results 11 to 17 of 17

Thread: Mysql, can only connect from local host?

  1. #11
    Join Date
    Nov 2009
    Location
    Mataro, Spain
    Beans
    14,283
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Mysql, can only connect from local host?

    I would say try reinstalling mysql on the server. It shouldn't matter that you added phpmyadmin later.

    To make sure you get rid of all config (and if there is nothing you with to keep!!!):
    Code:
    sudo apt-get purge mysql-server
    sudo apt-get install mysql-server
    Then check if the default my.cnf has more data, make a copy before beginning to edit it (so you always have the default original) and try to change the bind-address. I think just commenting out the 'bind-address=127.0.0.1' should be enough in fact. In case it comes uncommented (active).
    Darko.
    -----------------------------------------------------------------------
    Ubuntu 14.04 LTS 64bit & Windows 10 Pro 64bit

  2. #12
    Join Date
    Aug 2012
    Beans
    119

    Re: Mysql, can only connect from local host?

    I did "sudo apt-get --purge remove mysql-server" then "sudo apt-get install mysql-server" and I think it installed the same version.
    Ubuntu sever
    Code:
    admin-ben@LangweilerG:~$ mysql -V
    mysql  Ver 14.14 Distrib 5.6.28, for debian-linux-gnu (x86_64) using  EditLine wrapper
    admin-ben@LangweilerG:~$
    Ubuntu Desktop laptop and Debian server. (not sure why my laptop has mysql server on it)
    Code:
    admin-ben@Dellio:~$ mysql -V
    mysql  Ver 14.14 Distrib 5.5.47, for debian-linux-gnu (x86_64) using readline 6.3
    admin-ben@Dellio:~$
    Hmm I guess it didn't ask me to make a password for root, but on my debian build it uses ReadLine wrapper? What is the wrapper?
    Just noticed darkod's post. Tired it and the same thing.
    Maybe its installing a broken version of it? This wouldn't be the first time ubuntu server has done this to me. (samba feature broken or totaled for os reinstall)

  3. #13
    Join Date
    Mar 2006
    Location
    Williams Lake
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: Mysql, can only connect from local host?

    Quote Originally Posted by Higgins909 View Post
    Its only going to be on a LAN, the modem/router thing will not be port forwarded for mysql. But what do you mean "without a password" Like do I log into server by ssh, then sudo mysql -u root -p or ?
    I installed mysql-server on my debian machine but did not install phpmyadmin or apache2 as I was just testing and the my.cnf was way more filled out.
    On a security note, I noticed in phpmyadmin, you could setup so users could only connect to the mysql server from a certain ip. (have yet to test for sure)
    What I meant is to use ssh with public and private keys, instead of using a password. You also don't need to use sudo to work with mysql.

  4. #14
    Join Date
    Nov 2009
    Location
    Mataro, Spain
    Beans
    14,283
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Mysql, can only connect from local host?

    Mysql can be different version between ubuntu and debian, depending which version of mysql is in the current repositories. Between ubuntu desktop and server it should be the same if they are same version and if mysql was installed with apt-get (not manually from source).

    So even reinstalling mysql ended up with the same empty my.cnf, is that what you are saying?
    Darko.
    -----------------------------------------------------------------------
    Ubuntu 14.04 LTS 64bit & Windows 10 Pro 64bit

  5. #15
    Join Date
    Aug 2012
    Beans
    119

    Re: Mysql, can only connect from local host?

    Quote Originally Posted by darkod View Post
    Mysql can be different version between ubuntu and debian, depending which version of mysql is in the current repositories. Between ubuntu desktop and server it should be the same if they are same version and if mysql was installed with apt-get (not manually from source).

    So even reinstalling mysql ended up with the same empty my.cnf, is that what you are saying?
    Yep, that's what I'm saying.


    Laptop
    Code:
    admin-ben@Dellio:~$ lsb_release -a
    No LSB modules are available.
    Distributor ID: Ubuntu
    Description:    Ubuntu 14.04.4 LTS
    Release:        14.04
    Codename:       trusty
    admin-ben@Dellio:~$
    Server, which I think I also failed to mention that My debian and ubuntu server installs are on a VM server.
    The ubuntu server VM is also a VM install. (one of the install options)
    Code:
    admin-ben@LangweilerG:~$ lsb_release -a
    No LSB modules are available.
    Distributor ID: Ubuntu
    Description:    Ubuntu 15.04
    Release:        15.04
    Codename:       vivid
    admin-ben@LangweilerG:~$

  6. #16
    Join Date
    Aug 2012
    Beans
    119

    Re: Mysql, can only connect from local host?

    I found it... this is a bit embarrassing...
    I did notice in the my.cnf of etc/mysql that at the bottom of the included dir's, but I thought the "mysql.conf.d" was a file... I did nano it but failed to notice nano saying it was a dir.
    Same for the other one. Probably would have spotted this sooner if I knew the ssh color code when I "ls". But in the end, googling the troubled mysql version with keyword my.cnf did it.

  7. #17
    Join Date
    Nov 2009
    Location
    Mataro, Spain
    Beans
    14,283
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Mysql, can only connect from local host?

    Great, I was suspecting if the included paths contain the file but failed to mention it.

    By the way, did you notice that you are running the non-LTS 15.04 on your server? And also by the way, it is out of support already. It was released April 2015 and it has only 9 months of support.

    Because of that people rarely use non-LTS for servers, even for home servers. Also, your laptop has desktop 14.04 LTS and your server 15.04, hence the difference in the mysql version between the two.
    Darko.
    -----------------------------------------------------------------------
    Ubuntu 14.04 LTS 64bit & Windows 10 Pro 64bit

Page 2 of 2 FirstFirst 12

Bookmarks

Posting Permissions

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