LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 07-11-2014, 07:57 AM   #1
umbloaded
Member
 
Registered: Apr 2013
Posts: 38

Rep: Reputation: Disabled
restore mysql root


Hello, I've deleted user root through phpmyadmin and now when I type mysql in prompt it gives me error 1045 (280000).
I tried to start with grant table option but it prompt out a lot of messages regarding so libraries.
What can I do now ?

Thank you
 
Old 07-11-2014, 10:09 AM   #2
cwc
Member
 
Registered: Nov 2004
Location: Tri-Cities, WA
Distribution: Gentoo, Ubuntu, Mint,Fedora
Posts: 71

Rep: Reputation: 16
Quote:
Originally Posted by umbloaded View Post
Hello, I've deleted user root through phpmyadmin and now when I type mysql in prompt it gives me error 1045 (280000).
I tried to start with grant table option but it prompt out a lot of messages regarding so libraries.
What can I do now ?

Thank you

Back up your database. Proceed slowly and research restoring. It's been a while since I've done this but I was able to restore my tables.
Research, backup. Can you login from tty?
logout
cwc@azzerare ~ $ mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 271
Server version: 5.1.70-log Gentoo Linux mysql-5.1.70

Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql>
 
Old 07-11-2014, 01:43 PM   #3
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
Quote:
Originally Posted by umbloaded View Post
I tried to start with grant table option but it prompt out a lot of messages regarding so libraries.
Do you mean the "skip-grant-tables" option?

https://www.google.com/#q=reset+root+mysql+password

Last edited by Habitual; 07-13-2014 at 08:54 AM. Reason: tables, not table
 
Old 07-13-2014, 07:29 AM   #4
cwc
Member
 
Registered: Nov 2004
Location: Tri-Cities, WA
Distribution: Gentoo, Ubuntu, Mint,Fedora
Posts: 71

Rep: Reputation: 16
http://www.linuxquestions.org/linux/answers/Security/MySQL_root_password_recovey

http://www.linuxquestions.org/linux/...ssword_recovey
 
Old 07-28-2014, 07:24 PM   #5
MfromH
LQ Newbie
 
Registered: Jul 2014
Distribution: openSuse 12.2, SLES11.3, RHEL 5,
Posts: 15

Rep: Reputation: Disabled
usually mysql creates some more root users, and guest-users without username, though they are not granted sufficient rights to manage the mysql server. So you should stop the server and restore the whole mysql directory in your datadir from backup. Before that you may want to copy the old directory to e.g. mysqlold within the datadir. Once yo get the server started again, you'll find that as a separate database and can copy entries, that may be missing in your backup.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I Restore a mysql database ? Glenn D. Linux - Software 1 07-30-2010 08:12 AM
how to restore mysql from /var/lib/mysql files ? zonemikel Linux - Server 2 08-30-2009 12:15 AM
Restore MySQL Dump File But I want it to restore with different names? helptonewbie Linux - Newbie 5 07-08-2009 05:09 AM
mysql database restore help compused Linux - General 3 10-28-2008 04:48 PM
MySQL restore help, Please :) inspleak Linux - Software 5 07-12-2004 03:36 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:49 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration