Wrox Programmer Forums
Go Back   Wrox Programmer Forums > PHP/MySQL > PHP Databases
| Search | Today's Posts | Mark Forums Read
PHP Databases Using PHP in conjunction with databases. PHP questions not specific to databases should be directed to one of the other PHP forums.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the PHP Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 20th, 2004, 02:17 PM
Authorized User
 
Join Date: Aug 2003
Location: Coeur d\'Alene, ID, USA.
Posts: 37
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Tachyon
Default accidentally deleted my MySQL login

I was following an online tutorial for setting up MySQL on my PC and I deleted all user logins. How do I create my login again?

__________________
An overworked Web Developer who\'s expected to know everything yet given time to study nothing.
 
Old May 21st, 2004, 09:36 AM
Friend of Wrox
 
Join Date: Jun 2003
Location: , , United Kingdom.
Posts: 256
Thanks: 0
Thanked 0 Times in 0 Posts
Default

If you haven't stopped and restarted the server, your root user will still be able to log in. The privileges table is not reread until the server is restarted, or until the root user invokes the FLUSH PRIVILEGES command from within mysql.

Failing that, mysql_install_db is the script that builds the privileges database on Unix systems, so running that would do the trick. saying that, Windows versions come with the privileges table pre-built, so mysql_install_db isn't used - even though it is included in the scripts directory of the installation.

If you're on Windows, you may try finding out if you can run mysql_install_db, somehow. However, if you're just using the thing to learn with and you don't mind losing whatever data is there, it's probably easier to just reinstall.

Let us know if you can still log in as root, and I'll talk you through rebuilding the user table in the mysql database, if you like.

Best of luck
dan
 
Old May 21st, 2004, 09:57 AM
Authorized User
 
Join Date: Aug 2003
Location: Coeur d\'Alene, ID, USA.
Posts: 37
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Tachyon
Default

The script I ran as part of an online tutorial included the FLUSH PRIVILEGES command.

I found a way to re-install it. I'll be ok now. Thank you so much for your kind response. I'm glad there is a place like this where us newbies can get information.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Recovering accidentally deleted logins in sql serv v-manraj SQL Server 2000 0 September 25th, 2007 02:55 PM
making login case sensitive with mysql database crmpicco MySQL 0 August 18th, 2006 05:48 AM
login screen in struts and mysql database mill3prog7@yahoo.co.in Struts 1 May 4th, 2006 09:07 AM
jsp & mysql login code sos jaymak121 Java Databases 4 November 25th, 2004 06:50 AM
mySQL login query problem??? nick_roberts5 PHP Databases 4 March 3rd, 2004 05:35 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.