add MySQL user without a user

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
wildcard
Forum Newbie
Posts: 1
Joined: Mon Oct 21, 2002 10:59 pm

add MySQL user without a user

Post by wildcard »

Ok, i got PHP, Apache, and MySQL to work, and I was playing with PHPMyAdmin, when i accidently deleted the only user in the MySQL database, how do i create a new user?
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

!untested!
in your mysql-data-directory there is a subdir mysql that holds the table information
  • columns_priv
  • db
  • func
  • host
  • tables_priv
  • user
(each as .frm, .MYD and .MYI).

maybe you can find a clean installation from where you can copy these files to your system.
Should be a similar mysql version and a backup of your mysql-dir is mandatory ;)
Post Reply