View Single Post
  #1   (View Single Post)  
Old 4th January 2013
ershiba ershiba is offline
Loading, please wait...
 
Join Date: Dec 2012
Posts: 34
Default [solved] phpMyAdmin - #2002 Cannot log in to the MySQL server

hi,,
let me described a bit what i have done,

1. clean install OpenBSD with X sets
2. add php-5.3.14p1, phpMyAdmin-3.4.10.2, mysql-server-5.1.63p0 and their dependencies.
3.
Code:
$ sudo nano /etc/rc.conf.local
mysqld_flasg=""
httpd_flags=""
pkg_scripts="mysqld"

$ sudo /usr/local/bin/mysql_install_db
$ sudo /usr/local/bin/mysql_secure_installation
4. setting phpMyAdmin link
Code:
$ cd htdocs/
$ sudo ln -s ../phpMyAdmin/ /var/www/htdocs/phpMyAdmin
5. i got 2 NIC on this virtual OpenBSD
Code:
$ ifconfig em0
em0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
        lladdr 08:00:27:a7:7a:af
        priority: 0
        groups: egress
        media: Ethernet autoselect (1000baseT full-duplex)
        status: active
        inet6 fe80::a00:27ff:fea7:7aaf%em0 prefixlen 64 scopeid 0x1
        inet 10.0.2.15 netmask 0xffffff00 broadcast 10.0.2.255
$ ifconfig em1
em1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
        lladdr 08:00:27:77:6e:08
        priority: 0
        media: Ethernet autoselect (1000baseT full-duplex)
        status: active
        inet 192.168.56.200 netmask 0xffffff00 broadcast 192.168.56.255
        inet6 fe80::a00:27ff:fe77:6e08%em1 prefixlen 64 scopeid 0x2
6. i sshd into my virtual OpenBSD using OBSD user name "oem" and i created a mysql user name "oem" too. i could use console mysql -u root -p and console mysql -p (when ssh using putty)
Code:
mysql> select User, Host, Password FROM mysql.user;
+------+-----------+-------------------------------------------+
| User | Host      | Password                                  |
+------+-----------+-------------------------------------------+
| root | localhost | *######################################## |
| oem  | %         | *######################################## |
| root | 127.0.0.1 |                                           |
+------+-----------+-------------------------------------------+
3 rows in set (0.00 sec)
i change the original password here to ### as display for security purpose.

7. i use http://192.168.56.200/phpMyAdmin and try to log in the
first attempt would direct my to http://vmobsdx.my.domain/phpMyAdmin/
i don't have valid hostname yet, i just dummy fill one, should i change it to localhost?
Code:
$ hostname
vmobsdx.my.domain
8. second attempt http://192.168.56.200/phpMyAdmin would displays the Welcome to phpMyAdmin, fill in username and password,

i tried the mysql root user and mysql oem user with their respective password (not the OpenBSD password) but received the following error,
#2002 Cannot log in to the MySQL server

that is pretty much how i reach to this error, any advice?
thank you.

Last edited by ershiba; 6th January 2013 at 06:12 AM. Reason: problem solved, thanks a lot!
Reply With Quote