MySQL Forums
Forum List  »  Newbie

Remote connection to MySQL database - HELP
Posted by: A B
Date: May 10, 2005 02:52PM

Please help! I would like to have other users on the network have access to the MySQL databases on my machine.

I installed MySQL via the XAMPP package by ApacheFriends.org.

After the installation is complete and I run MySQLManager, I see there are 2 directories - one is called "test" and the other "mysql".

Any databases under the "test" directory can be seen by others on the network, but no one can see the databases under the "mysql" directory which is the only place I can create new databases.

If I connect to MySQL via the command line console like this with no parameters I can only see the test database and I am not allowed to create any new databases:

C:\apachefriends\xampp\mysql\bin>mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 23 to server version: 4.1.11

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

mysql> show databases
-> ;
+----------+
| Database |
+----------+
| test |
+----------+
1 row in set (0.00 sec)

mysql> create database new;
ERROR 1044 (42000): Access denied for user ''@'%' to database 'new'
mysql>

If I connect using the loopback address 127.0.0.1, I can connect to all databases. But if I use the external IP address, I am only able to connect to the "test" database.

C:\apachefriends\xampp\mysql\bin>mysql -u root -h 127.0.0.1 -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 17 to server version: 4.1.11

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

mysql> show databases;
+------------+
| Database |
+------------+
| cdcol |
| mysql |
| phpmyadmin |
| test |
| webauth |
+------------+
5 rows in set (0.00 sec)

mysql> exit
Bye

** The XXX's represent the external IP address of my machine.
C:\apachefriends\xampp\mysql\bin>mysql -u root -h XXX.XXX.XXX.XXX -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 18 to server version: 4.1.11

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

mysql> show databases;
+----------+
| Database |
+----------+
| test |
+----------+
1 row in set (0.00 sec)

Why can't users on my network see the other databases (cdcol, mysql, phpadmin, etc)?

I would appreciate any advice :)

Thank you.

Options: ReplyQuote


Subject
Written By
Posted
Remote connection to MySQL database - HELP
A B
May 10, 2005 02:52PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.