0

I just installed MySQL on my pc using tutorial on the YouTube every thing set to default options during the installation the tutorial said that after the installation done I should open the MySQL 8.0 commend line client and then I should type the password to connect the database but when I open it and after I type my password it's close when I press enter so I tried to use the work MySQL workbench it's gives me this popup error error I search on the internet for solution I got this here but this solution for ubuntu none of the answers are not applicable on windows but some other solution gives me some other errors :

C:\Users\husam>mysql -u root -p
Enter password: ***************
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)

C:\Users\husam>mysql
ERROR 1045 (28000): Access denied for user 'ODBC'@'localhost' (using password: NO)

I want to use the MySQL with ruby on rails project on windows 10

Hussam F. Alkdary
  • 655
  • 1
  • 6
  • 21
  • as you installed it, you gave root as superuser a password, this you must use **exactly** as typed in. you can always reset the pasword https://dev.mysql.com/doc/refman/8.0/en/resetting-permissions.html – nbk Apr 22 '20 at 22:06
  • so I need to reset the password !! – Hussam F. Alkdary Apr 23 '20 at 07:27
  • When you don't wrote it down pr remember it, i don't see another chance – nbk Apr 23 '20 at 07:37
  • I just follow the instructions here https://dev.mysql.com/doc/refman/8.0/en/resetting-permissions.html I create txt file ALTER USER 'root'@'localhost' IDENTIFIED BY 'MyNewPass'; and cd to "C:\Program Files\MySQL\MySQL Server 8.0\bin" and run mysqld --init-file=D:\\mysql-init.txt I get an error – Hussam F. Alkdary Apr 23 '20 at 08:35
  • 2020-04-23T08:33:57.062306Z 0 [System] [MY-010116] [Server] C:\Program Files\MySQL\MySQL Server 8.0\bin\mysqld.exe (mysqld 8.0.19) starting as process 9748 2020-04-23T08:33:57.067150Z 0 [Warning] [MY-010091] [Server] Can't create test file C:\Program Files\MySQL\MySQL Server 8.0\data\mysqld_tmp_file_case_insensitive_test.lower-test – Hussam F. Alkdary Apr 23 '20 at 08:36
  • ower-test 2020-04-23T08:33:42.067932Z 0 [Warning] [MY-010091] [Server] Can't create test file C:\Program Files\MySQL\MySQL Server 8.0\data\mysqld_tmp_file_case_insensitive_test.lower-test 2020-04-23T08:33:42.068193Z 0 [ERROR] [MY-013276] [Server] Failed to set datadir to 'C:\Program Files\MySQL\MySQL Server 8.0\data\' (OS errno: 2 - No such file or directory) – Hussam F. Alkdary Apr 23 '20 at 08:36
  • 2020-04-23T08:33:42.102726Z 0 [ERROR] [MY-010119] [Server] Aborting 2020-04-23T08:33:42.103083Z 0 [System] [MY-010910] [Server] C:\Program Files\MySQL\MySQL Server 8.0\bin\mysqld.exe: Shutdown complete (mysqld 8.0.19) MySQL Community Server - GPL. – Hussam F. Alkdary Apr 23 '20 at 08:37
  • it may be silly but the issue was in my new password that's contains this ' one quote symbol and after I removed it every thing works fine thanks – Hussam F. Alkdary Apr 23 '20 at 09:14

1 Answers1

0

the issue wan in my password it's contain ' so I removed it and everything works fine

Hussam F. Alkdary
  • 655
  • 1
  • 6
  • 21