mysql50-server and phpmyadmin (remote connection)

paulfrottawa

Active Member

Thanks: 22
Messages: 241

#1
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

Member

Thanks: 60
Messages: 94

#2
paulfrottawa said:
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
 
OP
OP
paulfrottawa

paulfrottawa

Active Member

Thanks: 22
Messages: 241

#3
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 |
+------+---------------------+
 
OP
OP
paulfrottawa

paulfrottawa

Active Member

Thanks: 22
Messages: 241

#4
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
 

Ole

Member

Thanks: 60
Messages: 94

#5
paulfrottawa said:
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?
 
OP
OP
paulfrottawa

paulfrottawa

Active Member

Thanks: 22
Messages: 241

#6
Ole said:
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. ?
 
Top