Cannot connect to mysql server
Hello, I have an interesting problem. I installed mysql client and server from Redhat 7.3 RPM. Then I set up a username and password for a user monty (to use example from the manual). Then I grant priveleges for the user with: mysql GRANT ALL PRIVILEGES ON *.* TO [EMAIL PROTECTED] - IDENTIFIED BY 'some_pass' WITH GRANT OPTION; mysql GRANT ALL PRIVILEGES ON *.* TO monty@% - IDENTIFIED BY 'some_pass' WITH GRANT OPTION; and restarted mysql server. Let's assume the server name is sql.domain.edu I then tried to connect to the server as user monty from localhost: $ mysql -u monty -p and then tried it from another machine console: $ mysql -u monty -h sql.domain.edu -p and all is well. But when i tried to connect using the console from localhost (ie. sql.domain.edu) by specifiying hostname: $ mysql -u monty -h sql.domain.edu -p I got the cannot connect user [EMAIL PROTECTED] error message. Why does this happen? I fixed this by doing mysql GRANT ALL PRIVILEGES ON *.* TO [EMAIL PROTECTED] - IDENTIFIED BY 'some_pass' WITH GRANT OPTION; but I thought I already specified the wildcard on my previous grant previlege so that monty can access from *any* machine. Just curious as t why this happens, can anyone help? Thanks a lot. Reuben D. Budiardja -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
insert picture file in MySQL (+php)
Hi, I remember reading article about how to use MySql table as a place to put picture file. I can't find that article now. Can anyone help me with this? or point me to URL or something. I am using php as the front end. Thanks. Reuben D. Budiardja - 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
Re: insert picture file in MySQL (+php)
On Thursday 14 February 2002 10:16 am, Todd Williamsen wrote: Reuben, You can store the images into a database, but no one recommends it. What I do, is actually store the location of the file in the database then have PHP open it. Any reason why it is not recommended? I was going to do it that way (store the location of the file only), and have php open it and then use something like IMG SRC=$location. But the problem is, that way everyone who knows a bit about html can use view source and know the locations of the image file, and can open it directly. It's a problem for my particular case because we want to restrict access to the images, and only certain people can see certain image, and so on. The only I can think about right now to achieve that is to store the image directly in the table. That's why I asked. Thanks. Reuben D. Budiardja -Original Message- From: Reuben D Budiardja [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 14, 2002 9:08 AM To: [EMAIL PROTECTED] Subject: insert picture file in MySQL (+php) - 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
How To call mysql_insert_id
Hi, I am a newbie in MySQL. I use an auto_increment to insert to one of the column. How do I get the value inserted? The documentation seems to suggest using mysql_insert_id() function. But when I tried to call it using Select mysql_insert_id() or Select mysql_insert_id() from TABLE_NAME gives me error. I tried to find something in the doc, but it does not really help. Please help. Thanks in advance. Reuben D. Budiardja - 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