You are not logged in.

#1 2009-04-15 06:50:18

c0mputerking
Member
Registered: 2009-03-16
Posts: 8

Mysql will not let me login remotly

Hello all this is the contents of the /etc/my.conf have commented out the client stuff as well as the skip networkingline.  Tried adding a bind-address = X.X.X.X line but mysql would not start so i commented it out as well. Do i need the client stuff?

The following options will be passed to all MySQL clients
[client]
password        = your_password
port            = 3306
socket          = /tmp/mysql.sock

# Here follows entries for some specific programs

# The MySQL server
[mysqld]
port            = 3306
socket          = /tmp/mysql.sock
datadir         = /var/lib/mysql
skip-locking
key_buffer = 16M
max_allowed_packet = 1M
table_cache = 64
sort_buffer_size = 512K
net_buffer_length = 16K
myisam_sort_buffer_size = 8M
#bind-address = 68.144.12.210

there is no firewall on this machine and i have opened a port for

I restarted the database and ran these commands they seemed to work ok something about rows being updated

update db set Host='all' where Db='mydb';
update user set Host='all' where user='myuser';


Tried connecting to it from a remote linux machine like this and get an error

mysql -u myuser -h 68.144.12.210 -p
Enter password:
ERROR 2013 (HY000): Lost connection to MySQL server during query

there is no firewall on this machine and i have opened a port for 3306 on the hardware firewall/router.

Last edited by c0mputerking (2009-04-15 18:56:16)

Offline

#2 2009-04-15 12:51:12

mrunion
Member
From: Jonesborough, TN
Registered: 2007-01-26
Posts: 1,938
Website

Re: Mysql will not let me login remotly

If you can get to the machine, resetting the MySQL root password is done as follows:

http://wiki.archlinux.org/index.php/MyS … t_Password

If you can't get to it, I don't know.


Matt

"It is very difficult to educate the educated."

Offline

#3 2009-04-15 18:55:11

c0mputerking
Member
Registered: 2009-03-16
Posts: 8

Re: Mysql will not let me login remotly

thanks for the reply but that will not work i have figured it out by temporally adding skip-grant-tables to my /etc/my.cnf allowed me access long enough to fix the problem. however my original problem still exists i cannot gain remote access to this box

Offline

#4 2009-04-15 22:24:45

thisllub
Member
From: Northern NSW Australia
Registered: 2007-12-28
Posts: 231

Re: Mysql will not let me login remotly

Have you commented out the skip-networking line?
Another thing that can be a problem is /etc/hosts.allow
I added mysqld: ALL to mine

Other than that check the host in the mysql user name is % for all machines or the machine name if you want to be specific.

Offline

#5 2009-04-16 20:57:43

c0mputerking
Member
Registered: 2009-03-16
Posts: 8

Re: Mysql will not let me login remotly

Thank you for your reply i added the mysqld: ALL to my hosts file as you suggested and now things are working.  However i did a terrible nasty hack to make mysql work and i need a hand fixing it.  My mysql command prompt skill are fairly weak and ran a command that effectively looked me out of mysql see below or in my past post on this thread.  I changed the root users host allow to all and now localhost access is denied the way i am getting around this is by adding skip-grant-tables to the /etc/my.cnf file.

Could you please help me with some basic user management? i would like to set a password for root as right now it has none this i can probably figure out.  However how do i change root to only have access to localhost again and my new remote user to have access from any or every remote address?  How do i list the users and there permissions/allowed hosts maybe point me to some good docs too thanks.

update db set Host='all' where Db='mydb';
update user set Host='all' where user='myuser';

Offline

#6 2009-04-17 06:00:31

thisllub
Member
From: Northern NSW Australia
Registered: 2007-12-28
Posts: 231

Re: Mysql will not let me login remotly

At this stage you should do a little more reading.

This will tell you how to solve your problem.
http://dev.mysql.com/doc/refman/5.0/en/ … sions.html

Offline

Board footer

Powered by FluxBB