Recent Changes - Search:

PmWiki

pmwiki.org

edit SideBar

MYSQL

Main.MYSQL History

Hide minor edits - Show changes to markup

February 12, 2007, at 12:11 AM by 70.255.222.243 -
Changed lines 3-4 from:
to:

Show Databases

show databases;
September 11, 2006, at 03:56 AM by 70.136.92.210 -
Changed lines 81-82 from:
to:

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

September 11, 2006, at 03:33 AM by 70.136.92.210 -
Changed lines 72-73 from:
to:

CREATE A USER for a database

GRANT SELECT, INSERT, UPDATE, DELETE

	ON webchess.*
	TO wchessuser
	IDENTIFIED BY 'rook';

May 08, 2006, at 07:04 PM by Zeppo -
Changed lines 72-79 from:

PHPWiki

Jump to the PHP section to find out what happened next: http://www.virtual-weltanschauung.com/pmwiki/pmwiki.php?n=Main.PHPWiki

to:

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

May 08, 2006, at 07:03 PM by Zeppo -
Added lines 72-73:
May 07, 2006, at 01:40 AM by zeppo -
Changed lines 1-4 from:

MySQL Commands

to:
May 07, 2006, at 01:40 AM by zeppo -
Added lines 1-4:

MySQL Commands

May 01, 2006, at 01:11 AM by zeppo -
Deleted lines 65-67:

(When using MySQL 4.1, I noticed that half the searches stopped working. I solved this with ALTER TABLE page CHARACTER SET latin1 COLLATE latin1_general_ci;, which fixed a problem with pagename being set to 'binary' collation. --KeithTyler) We will see if this happens, for now I ignored it

Deleted lines 67-86:

First generate an encrypted password for the wiki administrator with the passencrypt.php page. This page came with PhpWiki and is now in the PhpWiki directory on your webserver.

Open the default configuration file config/config-dist.ini and change the following entries:

* ADMIN_USER = YourAdminName
* ADMIN_PASSWD = The encrypted administrator password
* DATABASE_TYPE = SQL
* DATABASE_DSN = "mysql://wikiuser:password2@localhost/phpwiki" (For wikiuser and password2 see step 2 above, for phpwiki see step 1)
* DEFAULT_LANGUAGE = de or your most beloved language code
* SCRIPT_NAME = /the_absolute_path_from_server_root_to_your_wiki/index.php

              THIS MEANS STARTING AT THE WEB ROOT NOT HARD DRIVE ROOT DIRECTORY

Save the file with the new name config.ini in the config directory.
The entries WIKI_PGSRC, DEFAULT_WIKI_PGSRC, INLINE_IMAGES and USE_SAFE_DBSESSION are not correctly read in Version 1.3.11rc3.

5. Run your Wiki.

April 30, 2006, at 04:02 AM by zeppo -
Changed lines 30-35 from:

Just finished and I think it worked (so far). Using http://phpwiki.sourceforge.net/phpwiki/MySqlInstall

OK, so it didn'y work at firsr but it turns out I misunderstood the SCRIPT_NAME path.


to:
April 30, 2006, at 04:02 AM by zeppo -
Changed lines 28-29 from:

Trying to setup PHPWiki to use MySQL

to:

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

Changed lines 96-115 from:

I had to close out the browser and restart it to find the homepage for the wiki


Now I can display everything but I cannot edit or create any page. In Mozilla it brings up a blank page and in IE I get a page cannot be displayed.

I switch to a non MySQL version (flatfile) and I have the same problems.

A permissions problem?

I don't think so as I gave others permission to write on the phpwiki folder and subfolders. Something in the code I guess.


Jump to the PHP section to find out what happened next http://www.virtual-weltanschauung.com/pmwiki/pmwiki.php?n=Main.PHPWiki

to:

Jump to the PHP section to find out what happened next: http://www.virtual-weltanschauung.com/pmwiki/pmwiki.php?n=Main.PHPWiki

April 30, 2006, at 12:28 AM by zeppo -
Changed lines 110-115 from:

Jump to the PHP section to find out what happened next

to:

Jump to the PHP section to find out what happened next http://www.virtual-weltanschauung.com/pmwiki/pmwiki.php?n=Main.PHPWiki

April 30, 2006, at 12:27 AM by zeppo -
Changed lines 113-138 from:

Thanks to an now obvious suggestions, I checked the apache log file and found

 [error] PHP Fatal error:  Allowed memory size of 8388608 bytes exhausted (tried to allocate 11520 bytes) 

Searching the web brought two suggestions, one was change the .htaccess file which I took to mean the one in my phpwiki folder and add a line about memeory allocation.

I tried that but it didn't work

The other suggestion was to edit the php.ini file in /etc/apache/php.ini

I found the resource sections and change it from 8 MB to 12 MB

;;;;;;;;;;;;;;;;;;;
; Resource Limits ;
;;;;;;;;;;;;;;;;;;;

max_execution_time = 30     ; Maximum execution time of each script, in seconds
max_input_time = 60	; Maximum amount of time each script may spend parsing request data
memory_limit = 12M      ; Maximum amount of memory a script may consume (8MB)

to:

April 30, 2006, at 12:25 AM by zeppo -
Added lines 109-113:

Jump to the PHP section to find out what happened next


April 29, 2006, at 11:58 PM by zeppo -
Changed lines 111-112 from:

[error] PHP Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 11520 bytes)

to:
 [error] PHP Fatal error:  Allowed memory size of 8388608 bytes exhausted (tried to allocate 11520 bytes) 
April 29, 2006, at 11:58 PM by zeppo -
Added lines 106-133:


Thanks to an now obvious suggestions, I checked the apache log file and found

[error] PHP Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 11520 bytes)

Searching the web brought two suggestions, one was change the .htaccess file which I took to mean the one in my phpwiki folder and add a line about memeory allocation.

I tried that but it didn't work

The other suggestion was to edit the php.ini file in /etc/apache/php.ini

I found the resource sections and change it from 8 MB to 12 MB

;;;;;;;;;;;;;;;;;;;
; Resource Limits ;
;;;;;;;;;;;;;;;;;;;

max_execution_time = 30     ; Maximum execution time of each script, in seconds
max_input_time = 60	; Maximum amount of time each script may spend parsing request data
memory_limit = 12M      ; Maximum amount of memory a script may consume (8MB)

April 29, 2006, at 04:14 AM by 70.254.164.152 -
Changed lines 105-106 from:
to:
I don't think so as I gave others permission to write on the phpwiki folder and subfolders. Something in the code I guess.
April 29, 2006, at 04:11 AM by 70.254.164.152 -
Added lines 102-106:

I switch to a non MySQL version (flatfile) and I have the same problems.

A permissions problem?

April 29, 2006, at 02:47 AM by zeppo -
Changed lines 96-101 from:

I had to close out the browser and restart it to find the homepage for the wiki

to:

I had to close out the browser and restart it to find the homepage for the wiki


Now I can display everything but I cannot edit or create any page. In Mozilla it brings up a blank page and in IE I get a page cannot be displayed.

April 28, 2006, at 12:35 PM by 70.128.87.51 -
Changed lines 36-37 from:

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

to:

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

April 28, 2006, at 12:34 PM by 70.128.87.51 -
Changed lines 32-33 from:

OK, so it actuall doesn't work as all the links came up as 404 errors. It turns out I misunderstood the SCRIPT_NAME path.

to:

OK, so it didn'y work at firsr but it turns out I misunderstood the SCRIPT_NAME path.

Changed lines 36-37 from:

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:

to:

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:

April 28, 2006, at 05:44 AM by zeppo -
Changed lines 36-37 from:

[@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:

to:

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:

Changed lines 53-54 from:

@]

to:
Changed line 64 from:

[@

to:
Changed lines 78-86 from:
    * ADMIN_USER = YourAdminName
    * ADMIN_PASSWD = The encrypted administrator password
    * DATABASE_TYPE = SQL
    * DATABASE_DSN = "mysql://wikiuser:password2@localhost/phpwiki" (For wikiuser and password2 see step 2 above, 
                                                                                         for phpwiki see step 1)
    * DEFAULT_LANGUAGE = de or your most beloved language code
    * SCRIPT_NAME = /the_absolute_path_from_server_root_to_your_wiki/index.php

@]

to:
* ADMIN_USER = YourAdminName
* ADMIN_PASSWD = The encrypted administrator password
* DATABASE_TYPE = SQL
* DATABASE_DSN = "mysql://wikiuser:password2@localhost/phpwiki" (For wikiuser and password2 see step 2 above, for phpwiki see step 1)
* DEFAULT_LANGUAGE = de or your most beloved language code
* SCRIPT_NAME = /the_absolute_path_from_server_root_to_your_wiki/index.php

Changed lines 88-89 from:

[@ Save the file with the new name config.ini in the config directory.

to:

Save the file with the new name config.ini in the config directory.\\

Changed lines 92-93 from:

@]

to:
April 28, 2006, at 05:42 AM by zeppo -
Changed lines 32-33 from:

OK, so it actuall doesn't work when you click on any link. So maybe the below doesn't work.

to:

OK, so it actuall doesn't work as all the links came up as 404 errors. It turns out I misunderstood the SCRIPT_NAME path.

Changed lines 82-83 from:
    * DATABASE_DSN = "mysql://wikiuser:password2@localhost/phpwiki" (For wikiuser and password2 see step 2 above, for phpwiki see step 1)
to:
    * DATABASE_DSN = "mysql://wikiuser:password2@localhost/phpwiki" (For wikiuser and password2 see step 2 above, 
                                                                                         for phpwiki see step 1)
Changed lines 91-92 from:

Save the file with the new name config.ini in the config directory. The entries WIKI_PGSRC, DEFAULT_WIKI_PGSRC, INLINE_IMAGES and USE_SAFE_DBSESSION are not correctly read in Version 1.3.11rc3.

to:

Save the file with the new name config.ini in the config directory. The entries WIKI_PGSRC, DEFAULT_WIKI_PGSRC, INLINE_IMAGES and USE_SAFE_DBSESSION are not correctly read in Version 1.3.11rc3.

April 28, 2006, at 05:39 AM by zeppo -
Added line 86:
Added line 88:
April 28, 2006, at 05:39 AM by zeppo -
Added line 85:

@]

Changed line 87 from:
to:

[@

April 28, 2006, at 05:38 AM by zeppo -
Changed lines 85-86 from:
to:
              THIS MEANS STARTING AT THE WEB ROOT NOT HARD DRIVE ROOT DIRECTORY
April 28, 2006, at 05:09 AM by zeppo -
Changed lines 34-35 from:
to:

April 28, 2006, at 05:08 AM by zeppo -
Changed lines 28-30 from:

Trying to setup PHPWiki to use MySQL, Just finished and I think it worked (so far). Using http://phpwiki.sourceforge.net/phpwiki/MySqlInstall

to:

Trying to setup PHPWiki to use MySQL

Just finished and I think it worked (so far). Using http://phpwiki.sourceforge.net/phpwiki/MySqlInstall

OK, so it actuall doesn't work when you click on any link. So maybe the below doesn't work.

April 28, 2006, at 05:04 AM by zeppo -
Added lines 85-86:

I had to close out the browser and restart it to find the homepage for the wiki

April 28, 2006, at 05:04 AM by zeppo -
Changed lines 28-31 from:

Trying to setup PHPWiki to use MySQL, not done yet. Using http://phpwiki.sourceforge.net/phpwiki/MySqlInstall

So far I've tried:

to:

Trying to setup PHPWiki to use MySQL, Just finished and I think it worked (so far). Using http://phpwiki.sourceforge.net/phpwiki/MySqlInstall

April 28, 2006, at 05:02 AM by zeppo -
Added lines 51-52:

Changed lines 58-85 from:
to:

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


(When using MySQL 4.1, I noticed that half the searches stopped working. I solved this with ALTER TABLE page CHARACTER SET latin1 COLLATE latin1_general_ci;, which fixed a problem with pagename being set to 'binary' collation. --KeithTyler) We will see if this happens, for now I ignored it

4. Edit the configuration to reflect your settings.

First generate an encrypted password for the wiki administrator with the passencrypt.php page. This page came with PhpWiki and is now in the PhpWiki directory on your webserver.

Open the default configuration file config/config-dist.ini and change the following entries:

    * ADMIN_USER = YourAdminName
    * ADMIN_PASSWD = The encrypted administrator password
    * DATABASE_TYPE = SQL
    * DATABASE_DSN = "mysql://wikiuser:password2@localhost/phpwiki" (For wikiuser and password2 see step 2 above, for phpwiki see step 1)
    * DEFAULT_LANGUAGE = de or your most beloved language code
    * SCRIPT_NAME = /the_absolute_path_from_server_root_to_your_wiki/index.php

Save the file with the new name config.ini in the config directory. The entries WIKI_PGSRC, DEFAULT_WIKI_PGSRC, INLINE_IMAGES and USE_SAFE_DBSESSION are not correctly read in Version 1.3.11rc3.

5. Run your Wiki.
April 28, 2006, at 04:29 AM by zeppo -
Changed lines 28-29 from:

Trying to setup PHPWiki to use MySQL, not done yet. So far I've tried:

to:

Trying to setup PHPWiki to use MySQL, not done yet. Using http://phpwiki.sourceforge.net/phpwiki/MySqlInstall

So far I've tried:

April 28, 2006, at 04:28 AM by zeppo -
Added lines 25-54:

Trying to setup PHPWiki to use MySQL, not done yet. So far I've tried:

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!

April 27, 2006, at 04:18 AM by zeppo -
Deleted line 0:
Changed lines 16-17 from:

FLUSH PRIVILEGES;

to:
FLUSH PRIVILEGES;
April 27, 2006, at 04:18 AM by zeppo -
Added lines 1-25:

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";

FLUSH PRIVILEGES;

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

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