Skip to main content

Thread: mysql database missing


dear all

installed mysql server 5.5 under ubuntu 12.10 through repository. when trying change password, got following message:

code:
ll@wenwen:~$ mysqladmin -u root password "newpassword"; mysqladmin: connect server @ 'localhost' failed error: 'access denied user 'root'@'localhost' (using password: no)' ll@wenwen:~$
i googled online; seems reason not change password because "mysql" database lost. checked installed database , got following information:

code:
mysql> show databases; +--------------------+ | database           | +--------------------+ | information_schema | | test               | +--------------------+ 2 rows in set (0.00 sec)  mysql>
so "mysql" database missing? how can recover it?

before ran `show databases;` command must have connected mysql. if did using command

code:
mysql
then connected mysql "null" user (no username , no password). in case 'mysql' database not show because null user not have permission see it.

when installing 'mysql-server' repositories prompted set mysql root password. if repeatedly decline (and ask 3 (3) times) mysql root user have no password. not recommended security reasons. however, if can connect mysql root via

code:
mysql --user=root
if command gives same error received before ('access denied user 'root'@'localhost' (using password: no)') mysql server does have root password. if don't know password can reset mysql root password using instructions here (from mysql reference manual).


Forum The Ubuntu Forum Community Ubuntu Specialised Support Ubuntu Servers, Cloud and Juju Server Platforms [ubuntu] mysql database missing


Ubuntu

Comments

Popular posts from this blog

Some mp4 files not displaying correctly (CS6)

Thread: Samba is not authenticating with LDAP