unknown data base
I'm new to mysql, but going on ... I've set up user jupshoes to the data base phpbook with the GRANT command: GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP ON phpbook.* TO jupshoes@localhost IDENTIFIED BY 'jupshoes'; GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP ON phpbook.* TO jupshoes@panera IDENTIFIED BY 'jupshoes'; After that I've checked there are the related entries in to the user and the database tables. And now I want to populate the database, but the user jupshoes can't even see the database: (The user jupshoes connects to the host panera via TELNET) $ mysql -ujupshoes -pjupshoes phpbook unknown database or mysqlselect* from phpbook; No data base selected or $ mysql -ujupshoes -pjupshoes phpbookphpbook.sql(to populate the table) Unknown database What is going wrong? Thanks in advance! Josep - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Fw: PHP+MYSQL: unable to select database
- Original Message - From: Kevin Donnelly [EMAIL PROTECTED] To: josep [EMAIL PROTECTED] Sent: Tuesday, December 11, 2001 11:27 AM Subject: Re: PHP+MYSQL: unable to select database Hi Josep It is a php guestbook (called phpBook) with mysql downloaded from www.netone.at OK - I've had a look at their install file. * creating a db: mysqladmin -uroot -p create mydatabase; I've done instead (as of phpBook documentation tells): # mysqladmin -u jupshoes -pjupshoes -p create phpbook Database phpbook created. (before I've added the user jupshoes in the mysql.user table with create_priv) OK. Can I suggest that you take things one step at a time here? Instead of using your new user jupshoes, just use the root one, then you can move on from that afterwards. If you were able to create user jupshoes, then that means you must have MySQL root privileges at least within your FTP area. This is the way that MySQL is usually set up on a hoster, although you may need to use your FTP username instead of the name root. So I would delete the db phpbook (log into mysql, and then: drop database phpbook). Then use the line I gave you to recreate the db, using your FTP username if root is not appropriate. * logging onto MySQL and populating the database from the supplied script: mysql -uroot -p mydatabase /path/to/database.sql. NOW!!! (via telnet as jupshoes) # mysql -ujupshoes -p phpbookMYPATH/phpBook.sql Enter password: (I've do it) ERROR 1050 at line 11: Table 'badwords' already exists This error is because you previously tried to create the db, and it has an entry for the table. Deleting the db and recreating it will get around this (although you could also just delete the table:-)). Then try the line I gave you again, but again using root/FTPuser instead of jupshoes. Comments: * after all phpbook isn't in the mysql.db file (It doesn't appear when doing SELECT* FROM mysql.db) Not all dbs will appear in this table. I THINK only dbs that have been set up to allow access by users other than root appear here. * should the jupshoes user have any other privs in the mysql users table (now only has create priv) Yes, eventually. But I strongly suggest taking things one step at a time. Get it set up by root first, and show that it is working, and then set up the user jupshoes, and get it working with him. That way, you can track down problems easier. It may seem slower, but believe me, it's faster! The phpBook install file also says you could run install.php to do this all automatically. Since you've started with the manual route, though, perhaps you should stick to it. Just remember that in any case install.php must be deleted from the live site. * Should I reply messages to people helping me or to the mailing list? You should reply to the mailing list normally. However, no-one had answered your question, and I don't visit the list regularly, so I thought if you re-posted with difficulties I might not see them. Hence the suggestion you contact me direct. It's usual, though, even if you do things offline, to repost the topic with SOLVED in the subject line if you get things working, so that others may be helped if they have a similar problem. You're welcome to copy this to the list if you want. Best wishes Kevin - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
SUCCESS!! unknown data base
OK! Now it works. I've just didn't create the database. I thought tha it was created automatically by the GRANT command, but in fact it sets up the user and the privileges but don't create the database. So only thing left was: CREATE DATABASE phpbook; and after that populate it with tables, etc. Sorry my newbie errors! Thank's to everybody in the mailing lists arround the net! Bye. Josep. My problem was: I'm new to mysql, but going on ... I've set up user jupshoes to the data base phpbook with the GRANT command: GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP ON phpbook.* TO jupshoes@localhost IDENTIFIED BY 'jupshoes'; GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP ON phpbook.* TO jupshoes@panera IDENTIFIED BY 'jupshoes'; After that I've checked there are the related entries in to the user and the database tables. And now I want to populate the database, but the user jupshoes can't even see the database: (The user jupshoes connects to the host panera via TELNET) $ mysql -ujupshoes -pjupshoes phpbook unknown database or mysqlselect* from phpbook; No data base selected or $ mysql -ujupshoes -pjupshoes phpbookphpbook.sql(to populate the table) Unknown database What is going wrong? Thanks in advance! Josep OK! Now it works. I've just didn't create the database. I thought tha it was created automatically by the GRANT command, but in fact it sets up the user and the privileges but don't create the database. So only thing left was: CREATE DATABASE phpbook; and after that populate it with tables, etc. Sorry my newbie errors! Thank's to everybody in the mailing lists arround the net! Bye. Josep. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
PHP+MYSQL: unable to select database
I get: unable to select database when I visit my guestbook.php The user trying it is set in the mysql.user (without any perms) and in the mysql.db (with all perms). Do I have to set all perms to this user in the mysql.user table? Josep - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
no mysql command line for normal user
I type (as normal user called jupshoes) the following: mysql -u jupshoes -p password guestbook.sql and I don't connect to the server but I'm sent back to the shell after printing the help lines. Why? Josep - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
PHP+MYSQL unable to select database
I can't select a database from a php script. I've set privileges in both the user and the data base tables and I've done FLUSH PRIVILEGES; WHY? JOSEP. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
howto change db privileges?
I'm able to connect to connect to the database but unable to select elements. Josep - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
access denied for user:
(Debian Linux 2.2) trying (logged in as the owner of the database): mysql guestbook.sql (database is palced in my home directory) I get: access denied for user: '@localhost' to database 'guestbook.sql' What is going wrong? - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php