Mysql external connection

pnaves

Joined
May 27, 2009
Messages
66
Likes
0
Points
0
#1
I'm trying to connect to mysql server running in Elastix machine, but I did grant permissions to all users but the command affect 0 tables. And when I try a connection with Mysql Query Browser using my remote computer I have this message Access Denied For a user root@192.168.0.104 using password eLaStIx.2oo7

I guess that the Mysql configuration not allowing connect from remote machines, but I have little experience with linux machines and I can't figure out what I have to do to fix it.

Could someone give me the light?;)

regards
 

ramoncio

Joined
May 12, 2010
Messages
1,663
Likes
0
Points
0
#2
By default, mysql only allows local connections.

Have a look here:

http://www.devarticles.com/c/a/MySQL/Cr ... n-MySQL/1/

Also have a look into mysql manual for user permissions, and set them according to your security policies.

Allowing connections from root@"%" (% = any machine) is ok for testing, but I wouldn't allow it in a production server, but this is up to you.
 

pnaves

Joined
May 27, 2009
Messages
66
Likes
0
Points
0
#3
pnaves said:
I'm trying to connect to mysql server running in Elastix machine, but I did grant permissions to all users but the command affect 0 tables. And when I try a connection with Mysql Query Browser using my remote computer I have this message Access Denied For a user root@192.168.0.104 using password eLaStIx.2oo7

I guess that the Mysql configuration not allowing connect from remote machines, but I have little experience with linux machines and I can't figure out what I have to do to fix it.

Could someone give me the light?;)

regards
I tried to type this commands:

#mysql -u root -p
(password is the same eLaS.... Etc etc
Then after login

GRANT ALL PRIVILEGES ON asteriskcdrdb.* TO 'asteriskuser'@'192.168.20.0/24' IDENTIFIED BY 'eLaStIx.asteriskuser.2oo7' WITH GRANT OPTION;

But, I got this error:

Access denied for user 'root'@'localhost' to database 'asteriskcdrdb'.

Whats happening??

Please, help me!
 

pnaves

Joined
May 27, 2009
Messages
66
Likes
0
Points
0
#4
pnaves said:
pnaves said:
I'm trying to connect to mysql server running in Elastix machine, but I did grant permissions to all users but the command affect 0 tables. And when I try a connection with Mysql Query Browser using my remote computer I have this message Access Denied For a user root@192.168.0.104 using password eLaStIx.2oo7

I guess that the Mysql configuration not allowing connect from remote machines, but I have little experience with linux machines and I can't figure out what I have to do to fix it.

Could someone give me the light?;)

regards
I tried to type this commands:

#mysql -u root -p
(password is the same eLaS.... Etc etc
Then after login

GRANT ALL PRIVILEGES ON asteriskcdrdb.* TO 'asteriskuser'@'192.168.20.0/24' IDENTIFIED BY 'eLaStIx.asteriskuser.2oo7' WITH GRANT OPTION;

But, I got this error:

Access denied for user 'root'@'localhost' to database 'asteriskcdrdb'.

Whats happening??


Please, help me!

Look at my attempt:


[root@elastix ~]# mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 17828
Server version: 5.0.45 Source distribution

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> grant all privileges on *.* to root@"%";
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
 

ramoncio

Joined
May 12, 2010
Messages
1,663
Likes
0
Points
0
#5
This happened to me a couple of times when I tried to change root permissions from localhost to % using webmin or phpmyadmin, I can't tell for sure.
I don't remember very well how I solved it, it was a long time ago, but I think it was starting mysqld_safe with --skip-grant-tables or with --init-file=mysql.txt. You will have to read a little about mysql permissions. Or maybe someone else can help you here.

Good luck, and if you find the solution please post it here to help some others in the same situation.
 

pnaves

Joined
May 27, 2009
Messages
66
Likes
0
Points
0
#6
I don't know the reason but I did this using empty password!:)
 

ramoncio

Joined
May 12, 2010
Messages
1,663
Likes
0
Points
0
#7
Is it a test machine or a production one?
Maybe you'll finish faster reinstalling from scratch?

But if you try to fix it, sure you'll learn more about mysql, and also help people in your same situation.
 

viti

Joined
Jun 30, 2009
Messages
9
Likes
0
Points
0
#8

Members online

No members online now.

Latest posts

Forum statistics

Threads
30,915
Messages
130,920
Members
17,594
Latest member
knethardsolutions
Top