# mysql50-server and phpmyadmin (remote connection)



## paulfrottawa (Dec 9, 2008)

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 (Dec 9, 2008)

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.
> 
> ...



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 (Dec 9, 2008)

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 (Dec 10, 2008)

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 (Dec 10, 2008)

paulfrottawa said:
			
		

> Thanks you
> 
> Yes that worked but:
> 
> ...



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


----------



## paulfrottawa (Dec 11, 2008)

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. ?


----------



## Ole (Dec 11, 2008)

> Should I be using dba as a remote name instead of root



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


----------

