Recent Changes - Search:


edit SideBar



Show Databases

show databases;

Forgotten Root Password

killall mysqld

wait until MySQL shuts down. Then run

mysqld_safe --skip-grant-tables &

then you will be able to login as root with no password.

mysql -uroot mysql

In MySQL command line prompt issue the following command:

UPDATE user SET password=PASSWORD("abcd") WHERE user="root";

At this time your root password is reset to "abcd" and MySQL will now know the privileges and you'll be able to login with your new password:

	mysql -u root -p

And then enter your new password

Trying to setup PHPWiki to use MySQL - This is just the MySQL part. The full story is over in the PHP section.

1. Create a database with the (default) name phpwiki if you do not have one already. Use the root or another privileged account.

The command line syntax is:

mysqladmin -uuser -ppassword create phpwiki

2. Create a user for the database with the (default) name wikiuser who has the rights to select, insert, update, delete (again using an administration account). It is done in two steps on the command line:

Login to the database with:

mysql -uuser -ppassword phpwiki

If you use mySQL 4.x or higher, you will also need to grant 'LOCK' permissions, so your grant statement would look like:

GRANT select, insert, update, delete, lock tables ON phpwiki.* TO wikiuser@localhost IDENTIFIED BY 'password2';

The new password2 belongs to the wikiuser, not to the root.

On most shared webservers you can't create new users. Your hoster gave you a fixed mysql-username like web55. This user has some administration privileges and can create new tables. You can use phpMyAdmin to give this user the above mentioned rights for your phpwiki database.

Then it calls for:

 mysql -uuser -ppassword phpwiki <schemas/mysql-initialize.sql

And I don't know where or what schemas/mysql-initialize.sql is!

I FOUND IT in the a sub folder of phpwiki

3. Create the tables inside your database (still using an administration account). A lot of typing is necessary to do this. Therefore the developers have put together those commands in one SQL-batchfile. Let MySQL execute this file with the command:

mysql -uuser -ppassword phpwiki <schemas/mysql-initialize.sql

4. Edit the configuration to reflect your settings.

CREATE A USER for a database


	ON webchess.*
	TO wchessuser

On my home linux box I had to make the user wchessuser@localhost

Jump to the PHP section to find out what happened next: PHPWiki

Edit - History - Print - Recent Changes - Search
Page last modified on February 12, 2007, at 12:11 AM