My problem started with not remembering the root password. I am unable to:
- Login to the localhost/phpmyAdmin with root account
- Log in to mysql via the command line with root account
- change the root account password without errors (see below)
Detail:
. No changes I make in PHPMyAdmin's security page, or CONFIG.INC.PHP, or in the command line seem to bear any positive results for me. This has to be an utterly newbie maneuver.
Though it seems this issue has been addressed numerous times already, I've read numerous articles here and on different sites (Stackoverflow) regarding this error and still I find no thread with the answer that will meet my needs.
What I have done is repeat a few flavors of the below, numerous times, to get going. I still cannot get into phpMyAdmin or do anything in the command line with the root account.
I have:
1 reset my root Passwords for Windows Systems via a file (mysql-init.txt) containing these commands:
- Code: Select all
UPDATE mysql.user SET Password=PASSWORD('1234') WHERE User='root';
FLUSH PRIVILEGES;
2 after turning off MySql, the above commands were run via the command line from my XAMPP shell (run as administrator), the syntax like so:
- Code: Select all
msyqld --init-file=C:\My Website\Xampp\mysql\mysql-init.txt Note: the file resides in the mysql folder. I placed it there.
3 I at points I have modified my config.inc.php file, changing the password, but with no real different
outcome.
- Code: Select all
$cfg['Servers'][$i]['auth_type'] = 'cookie'; // Authentication method (config, http or cookie based)
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = 'hello';
$cfg['Servers'][$i]['extension'] = 'mysqli';
$cfg['Servers'][$i]['AllowNoPassword'] = true;
$cfg['Lang'] = '';
/* Bind to the localhost ipv4 address and tcp */
$cfg['Servers'][$i]['host'] = '127.0.0.1';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
/* User for advanced features */
$cfg['Servers'][$i]['controluser'] = 'pma';
$cfg['Servers'][$i]['controlpass'] = '';
/* Advanced phpMyAdmin features */
$cfg['Servers'][$i]['pmadb'] = 'phpmyadmin';
$cfg['Servers'][$i]['bookmarktable'] = 'pma_bookmark';
$cfg['Servers'][$i]['relation'] = 'pma_relation';
$cfg['Servers'][$i]['table_info'] = 'pma_table_info';
$cfg['Servers'][$i]['table_coords'] = 'pma_table_coords';
$cfg['Servers'][$i]['pdf_pages'] = 'pma_pdf_pages';
$cfg['Servers'][$i]['column_info'] = 'pma_column_info';
$cfg['Servers'][$i]['history'] = 'pma_history';
$cfg['Servers'][$i]['designer_coords'] = 'pma_designer_coords';
$cfg['Servers'][$i]['tracking'] = 'pma_tracking';
$cfg['Servers'][$i]['userconfig'] = 'pma_userconfig';
$cfg['Servers'][$i]['recent'] = 'pma_recent';
$cfg['Servers'][$i]['table_uiprefs'] = 'pma_table_uiprefs';
4 if i try logging onto the PHPMyadmin webpage with the root account, I get "#1045 Cannot log in to the MySQL
server"
5 if i try logging into mysql from the command line (run as administrator), with the command: mysql -u root -p (password entered).... I get the same thing.
From the command line i've run this command as well...
- Code: Select all
mysqladmin -u root password 1234
6 Also did this: SET PASSWORD FOR root@localhost = PASSWORD('1234'); Seemed to work, but i was still not able to sign on using the account with that password (error 1045).
I've heard it mentioned that there are two root accounts. Can anyone explain or point to the most succinct sources on how I am to start up using the database using these accounts? I must be doing something utterly stupid.
Please help if you can.
Thanks