LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Mysql Administrator Program (https://www.linuxquestions.org/questions/linux-newbie-8/mysql-administrator-program-333802/)

bentschmidt 06-15-2005 06:52 AM

Mysql Administrator Program
 
I have installed Mysql, Apache and PHP on Suse 9.2 on an single pc connected to my network.

I then installed the Mysql Administrator Program on my Windows XP computer to administrate my Mysql. But I can't get access to the Mysql server throug the Mysql Administrator Program

I can start the PHPmyadmin via the browser and see the Mysql databases test and mysql and make rights etc..


I need some help from all you out there.

k.r.
bentschmidt

perfect_circle 06-15-2005 07:08 AM

Is mysql's root account accessible from outside your computer?

Code:

skalkoto@darkstar:~$ mysql -u root -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1 to server version: 4.0.24

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

mysql> SELECT user, host FROM mysql.user;
+-------+-----------+
| user  | host      |
+-------+-----------+
| snort |          |
| snort | %        |
| root  | darkstar  |
| root  | localhost |
+-------+-----------+
4 rows in set (0.00 sec)

mysql>

In my case only localhost and darkstar (which is the local host name) can access the root account.

*EDIT*
Also check if there is a firewall in your linux box blocking the mysql port (3306 is the default mysql port)

bentschmidt 06-15-2005 07:37 AM

I tried the same as you and the following came up on my screen:

bes@linux:~> mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 71 to server version: 4.0.21

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

mysql> SELECT user, host FROM mysql.user;
+------+------------+
| user | host |
+------+------------+
| | linux.site |
| bes | linux.site |
| root | linux.site |
| | localhost |
| root | localhost |
+------+------------+
5 rows in set (0.00 sec)

mysql>

perfect_circle 06-15-2005 08:15 AM

Quote:

Originally posted by bentschmidt
I tried the same as you and the following came up on my screen:

bes@linux:~> mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 71 to server version: 4.0.21

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

mysql> SELECT user, host FROM mysql.user;
+------+------------+
| user | host |
+------+------------+
| | linux.site |
| bes | linux.site |
| root | linux.site |
| | localhost |
| root | localhost |
+------+------------+
5 rows in set (0.00 sec)

mysql>

You have 2 anonymous accounts (1 , 4) the root accounts (3, 5) and a bes account.
You can connect as root only from localhost and linux.site (I get the feeling that those are the same host).
If you want to be able to connect as root from somewhere you need a new root user.
Use the "grant" command to do this.
Something like :
grant <all the permisions you want> on *.* to root@<IP or host>;
SET PASSWORD FOR root@<IP or host> = PASSWORD('the_password_you_want');
Leaving the <IP or host> blank will let you connect from anywhere. If you care about security, this is a bad thing to do.
The gui is fine but you need to know basic stuff in the mysql console.
Download and read the mysql manual. It's all written in there.

Also, you might consider dropping the anonymous accounts.
DELETE FROM mysql.user WHERE User= '';
FLUSH PRIVILEGES;
or even delete the test database:
DROP DATABASE test;


All times are GMT -5. The time now is 11:11 PM.