LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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-25-2002, 09:13 PM   #1
java8964
LQ Newbie
 
Registered: Jul 2002
Posts: 20

Rep: Reputation: 0
how to recreate mysql database


Hi, My linux version is Suse 8.0. Today, I tried to load a sql script into mysql database. But I forget to change to the right db. So the script is loaded into mysql database. Even worse is that the scirpt has table named 'user', so it drop and recreate this table. Now in mysql database, I mass up with the whole database. I can't login as admin or any account now.

I tried to rerun the /usr/bin/mysql_init_db, but after that, I didn't find that the root password is set to empty. I still can't login as any account. What I should do to recreate a mysql database as the same as it fresh installed? I don't have too much data in it. The question is that I don't want to reinstall the whole database. I just want to recreate the database.


Please help. Thanks

The lesson I learned: Don't load any sql script using root!
 
Old 07-25-2002, 09:30 PM   #2
jeremy
root
 
Registered: Jun 2000
Distribution: Debian, Red Hat, Slackware, Fedora, Ubuntu
Posts: 12,351

Rep: Reputation: 3255Reputation: 3255Reputation: 3255Reputation: 3255Reputation: 3255Reputation: 3255Reputation: 3255Reputation: 3255Reputation: 3255Reputation: 3255Reputation: 3255
You can start MySQL with no permissions and then recreate the mysql database.

http://www.mysql.com/doc/R/e/Resetting_permissions.html

--jeremy
 
  


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
Recovering a mysql database irvken Linux - Software 2 10-09-2005 05:27 PM
Writing an app that uses a mysql database without installing mysql server? QtCoder Programming 4 08-09-2004 02:43 PM
MYSQL help - mysql database missing eloviyandhi Linux - Software 1 03-20-2004 09:20 PM
Mysql database from cd JHuizingh Linux - Software 0 02-22-2003 02:08 PM
mysql database huno Linux - General 8 02-11-2003 08:15 PM


All times are GMT -5. The time now is 11:20 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration