Welcome to Geeklog, Anonymous Saturday, December 21 2024 @ 10:11 pm EST
Geeklog Forums
mysql help for geeklog install?
jmil
Anonymous
Hello. I'm trying to install GeekLog 1.3.5 but am having trouble setting up MySQL. I have PHP 4.1.2 and MySQL 3.23.49 installed correctly, with a created database called geeklog, just as the geeklog INSTALL file specifies. However, after setting up my config.php file, editing lib-common.php, and running the geeklog installer script (install.php), I get through the first two pages and then the process terminates with the following error:
error selecting database
what are the basic privileges the mysql user needs to have to administer the geeklog database? is there an easy way to set these privileges? Do I need to specify that the mysql user is the geeklog administrator? I have found the MySQL manual difficult to wade through. Any help or suggestions would be greatly appreciated. Thanks.
jmil
7
7
Quote
Status: offline
dreamscape
Forum User
Junior
Registered: 01/22/02
Posts: 30
Basically you have two general options when you install Geeklog. You can create a database and pass geeklog the root user/password for MySQL (bad idea) or you can create a new database, and assign a new user permissions to that database. It's really easy to do, I'll give you the command line run down as most people should be able to figure out gui tools if they exist.
Essentially you need to do a few things.
1. Create the database:
a) mysqladmin -uroot -pPASSWORD create geeklog
b) mysql -uroot -pPASSWORD
create database geeklog;
both of those steps are functionally equivalent, one has you logging into the mysql console first, i actually prefer the second, because the next step is from the console.
2. Grant some privileges:
grant all privileges on geeklog.* to geeklogUser@localhost identified by 'geeklogPassword';
breaking it all down for you:
'grant all privileges' => means let this user do whatever they want (select, insert, delete, update, add/drop tables). You can specifiy individual options if you wanted to.
'on geeklog.*' => tells MySQL that this user will have the aforementioned privileges on all tables with the geeklog database. Again you can specify individual tables if they were already created.
'to geeklogUser@localhost' => tells MySQL that the username=geeklogUser and (connection from) host = localhost. Localhost can be anything, another valid DNS name, an ip address, etc.
'identified by 'geeklogPassword' ' => assigns a password to the geeklogUser
Best Practices ?
I think best practice would be to install the geeklog database as the root MySQL user, then do something like this from the mysql console:
grant insert, update, select, delete on......
To make a new user that can not add/drop tables (there isn't a geeklog need for that). You'd have to edit your config.php or lib-database.php depending on version to get the new user/password reflected for geeklog.
Hopefully that does it for you, if not:
http://mysql.com/doc/ (MySQL Documentation)
http://www.mysql.com/doc/G/R/GRANT.html (Grant and Revoke syntax)
4
4
Quote
jmil
Anonymous
Thanks! That was very informative. I will try it as soon as possible, and post my results here.
jmil
4
6
Quote
jmil
Anonymous
Thanks! It worked. Your explanation was excellent, and just what I needed. Much obliged.
jmil
7
7
Quote
Anonymous
Anonymous
I am also getting the same error after modifying the config.php file. After I select "New Database" from the dropdown window with a path to geeklog directory, it asks me to click Next. When I do, I get "error selecting database" message.
Can someone tell me how to set the mysql privileges using phpMyAdmin?
Secondly, is this step necessary? It doesn't mention anything about setting privs for mysql in the help file. Did it work for anyone else without messing with the privileges, etc?
Is there a way to continue with the installation if I populate the tables using phpMyAdmin using the data from a php file?
Thanks in advance.
-x-x-x-
6
4
Quote
All times are EST. The time is now 10:11 pm.
- Normal Topic
- Sticky Topic
- Locked Topic
- New Post
- Sticky Topic W/ New Post
- Locked Topic W/ New Post
- View Anonymous Posts
- Able to post
- Filtered HTML Allowed
- Censored Content