السلام عليكم ورحمة الله وبركاته .........
لاأعلم ما الذي كتبته البارحة فأدى إلى ضياع كلمة المرور الخاصة بالمستخدم root لقاعدة البيانات mysql .. !!
وكان الحل كالتالي :
1 - ايقاف الخدمة :
[root@LinuxServer ~]# service mysqld stop
2 - تشغيل الخدمة في وضعية تشبه الوضع الأمن :
[root@LinuxServer ~]# mysqld_safe --skip-grant-tables &
3 - تعديل كلمة المرور الخاصة بك :
[root@LinuxServer ~]# mysql
mysql> use mysql;
mysql> update user set password = PASSWORD('password') where user = 'root';
Query OK, 0 rows affected (0.00 sec)
Rows matched: 3 Changed: 0 Warnings: 0
mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)
mysql> exit
Byeالان قم بإيقاف الخدمة ومن ثم تشغيلها مرة أخرى وحاول الدخول بكلمة المرور التي وضعتها سابقاً :
[root@LinuxServer ~]# service mysqld stop Stopping MySQL: [ OK ] [root@LinuxServer ~]# service mysqld start Starting MySQL: [ OK ] [root@LinuxServer ~]# mysql -u root -p Enter password: Welcome to the MySQL monitor. Commands end with; or \g. Your MySQL connection id is 2 Server version: 5.0.45 Source distribution Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql>
إن شاء الله يكون الموضوع مفيداً للبعض .. !!
في أمان الله ..
Dr.pain