PDA

View Full Version : mysql50-server and phpmyadmin (remote connection)


paulfrottawa
December 9th, 2008, 18:07
I have mysql50-server in a jail named mysql. In another jail I installed apache22, php5, php5-mysql.

When I entered my user name and password into the phpmyadmin web page I got this error.

#1130 - Host '192.168.0.21' is not allowed to connect to this MySQL server

anyone know what I should do?

FreeBSD 7.0-RELEASE-p6

Ole
December 9th, 2008, 18:40
I have mysql50-server in a jail named mysql. In another jail I installed apache22, php5, php5-mysql.

When I entered my user name and password into the phpmyadmin web page I got this error.


anyone know what I should do?

FreeBSD 7.0-RELEASE-p6

For MySQLd in one jail connection from another jail looks like from foreign place. May be you forget set correct permission in mysqld server?

GRANT ALL PRIVILEGES ON *.* TO dba@192.168.0.21 IDENTIFIED BY 'passwd';
FLUSH PRIVILEGES;


then connect from phpmyadmin using user dba and password passwd.
Also, for 5x Mysql interconnect recommended for usage mysqli extension instead mysql

paulfrottawa
December 9th, 2008, 19:17
Thanks you

Yes that worked but:

My next message wrote
#1045 - Access denied for user 'root'@'192.168.0.21' (using password: YES)



__________________________________________

mysql> SELECT User,Host FROM mysql.user;
+------+---------------------+
| User | Host |
+------+---------------------+
| root | 127.0.0.1 |
| dba | 192.168.0.21 |
| | localhost |
| root | localhost |
| | mysql.localhost.bsd |
| root | mysql.localhost.bsd |
+------+---------------------+

paulfrottawa
December 10th, 2008, 05:44
Success initially I forgot to change the ('passwd') in your post.

I found and tried this
shell> mysql -u root
mysql> UPDATE mysql.user SET Password = PASSWORD('newpwd')
-> WHERE User = 'root';
mysql> FLUSH PRIVILEGES;

This code change all the root account to the same password. from mysql manual
(http://dev.mysql.com/doc/refman/5.0/en/default-privileges.html)

Ole
December 10th, 2008, 09:54
Thanks you

Yes that worked but:

My next message wrote




__________________________________________

mysql> SELECT User,Host FROM mysql.user;
+------+---------------------+
| User | Host |
+------+---------------------+
| root | 127.0.0.1 |
| dba | 192.168.0.21 |
| | localhost |
| root | localhost |
| | mysql.localhost.bsd |
| root | mysql.localhost.bsd |
+------+---------------------+

In this sample you insert records for dba user but continue trying login as root?

paulfrottawa
December 11th, 2008, 17:24
In this sample you insert records for dba user but continue trying login as root?

Should I be using dba as a remote name instead of root. Its working but I don't want to make mistakes in security. ?

Ole
December 11th, 2008, 19:46
Should I be using dba as a remote name instead of root


If all working - unnecessary. I've just got confused.