Connecting from a remote computer
Hi All, This is a dump and simple question but I can't seem to get it to work. How do I enable a user to be able to connect from a remost host using MySQL Administrator? I added % but once signed in, I still can't access the user panel in the administrator. Thanks. Kay -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Connecting from a remote computer
I got it working perfectly on a Linux server, but my boss wants this on a Windows IIS server. sigh The remote connection seems to be working now but I have another problem now... the page is not doing anything - doesn't seem to be connecting to the database, but I got no error messages whatsoever. The page just indicated Done on the bottom. The mysql_connect.php file is listed below. Is there a privilege problem or is there something else I need to enable? Much thanks. Kay ?php # Script - mysql_connect.php // This file contains the database access information for the database. This file also establishes a connection to MySQL and selects the database. // Set the database access information as constants. define ('DB_USER', 'username); define ('DB_PASSWORD', 'userpass'); define ('DB_HOST', 'localhost'); define ('DB_NAME', 'databasename'); // Make the connnection and then select the database. $dbc = @mysql_connect (DB_HOST, DB_USER, DB_PASSWORD) OR die ('Could not connect to MySQL: ' . mysql_error() ); mysql_select_db (DB_NAME) OR die ('Could not select the database: ' . mysql_error() ); // Function for escaping and trimming form data. function escape_data ($data) { global $dbc; if (ini_get('magic_quotes_gpc')) { $data = stripslashes($data); } return mysql_real_escape_string (trim ($data), $dbc); } // End of escape_data() function. ? At 10:53 AM 1/18/2007 Thursday, Chris White wrote: Just to toss something else in here. A lot of times you have a server that you can connect to by ssh, but because of firewalls, can't access mysql through. If you can, however, connect to the database through ssh, you can do port forwarding. In *nix systems it should be something like this: ssh -L 3306:server.com:3306 -N -f [EMAIL PROTECTED] This will forward requests from port 3306 locally to port 3306 on server.com. If you're on windows, you can also do port forwarding through putty: http://www.cs.uu.nl/technical/services/ssh/putty/puttyfw.html This becomes pretty easy when you get the hang of it. You can also do like: ssh -L 3000:server.com:3306 -N -f [EMAIL PROTECTED] if you're, say, running a local mysql instance. As a reminder connections will have to occur to localhost, not the server. Hope this helps.
newbie needs help
Hi All, I'm going throught some tutorial about uploading and displaying images files. But the display script isn't working. Here's what I have: Table setup is: CREATE TABLE `image` ( `ImageId` int(10) NOT NULL auto_increment, `Image` longblob, `FileType` varchar(32) default NULL, PRIMARY KEY (`ImageId`) ) Add image script (addimage.php) is: ?php // add image script if ($_POST['Submit']) { if ($_POST['MAX_FILE_SIZE'] = $_FILES['file']['size']) { //print_r($_FILES); include ('includes/mysql_connect.php'); // connect to db $photo = addslashes(fread(fopen($_FILES['file']['tmp_name'], r), $_FILES['file']['size'])); $query = sprintf(INSERT INTO image(Image, FileType) VALUES ('%s', '%s'), $photo, $_FILES['file']['type']); if (mysql_query($query)) { $messages[] = Your files is successfully store in database; } else { $messages[]= mysql_error(); } } else { $messages[] = The file is bigger than the allowed size (96k) please reduce your file size; } } ? html head titleAdd Image/title /head body ? if (isset($messages)) { foreach ($messages as $message) { print $message .br; } } ? form action= method=post enctype=multipart/form-data name=form1 input type=file name=file input type=hidden name=MAX_FILE_SIZE value=96000 input type=submit name=Submit value=Submit /form /body /html And imageloader.php is: ?php // imageloader.php include ('includes/mysql_connect.php'); $result = mysql_query(SELECT ImageId from image); while ($row = mysql_fetch_array($result)) { $ids[]=$row['ImageId']; } ? html head titleImage Loader/title /head body select image:br table width=80% border=0 cellspacing=0 cellpadding=0 tr td width=10%id/td td width=90%Image/td /tr tr td valign=top table width=100% border=0 cellspacing=0 cellpadding=0 ? foreach ($ids as $id) { ? tr tda href=?id=?= $id; ??= $id; ?/a/td /tr ? } ? /table /td td? if (isset($_GET['id'])) { ?img src=image.php?id=?= $_GET['id']; ?? } ?/td /tr /table /body /html And finally image.php is ?php // image.php include ('includes/mysql_connect.php'); // connect to db $result = mysql_query(sprintf(SELECT * from image WHERE ImageId = %d, $_GET['id'])); $row = mysql_fetch_array($result); header(sprintf(Content-type: %s, $row['FileType'])); echo Here's the picture: :, $row['Image']; ? When I click on the individual image id, the actual image won't show. Can someone tell me what am I missing here? Much thanks. Kay
Re: newbie needs help
At 04:22 PM 7/21/2006 Friday, Scott Haneda wrote: I'm going throught some tutorial about uploading and displaying images files. But the display script isn't working. Here's what I have: I think you may want to bring this to a php based list, not a mysql one. Yes, it's cross-posted. I just thought to try it here. Kay -- - Scott HanedaTel: 415.898.2602 http://www.newgeo.com Novato, CA U.S.A. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: PHP won't connect to MySQL - resolved
Andre, Yes, I sort of bypassed the problem by installing XAMPP. Works like a charm now. Thanks. Kay At 03:32 PM 7/19/2006 Wednesday, Andre Matos wrote: Hello Kay, Have you solved the issue or you are still not ablle running MySQL and PHP on Windows XP? Which version are you running for PHP, MySQL, and Apache? Andre On 7/18/06 2:31 PM, Kay C. Tien [EMAIL PROTECTED] wrote: I have that copied in there. Even tried a different version from the most recent MySQL download. Still getting the same error - PHP Warning: PHP Startup: Unable to load dynamic library 'C:\WINDOWS\SYSTEM32\php_mysql.dll' - The specified procedure could not be found. in Unknown on line 0 I don't get it! Kay At 09:57 AM 7/18/2006 Tuesday, João Cândido de Souza Neto wrote: I found the solution in my case. I just copy libmysql.dll from the php folder do \windows\system32 folder and everything works fine. Kay C. Tien [EMAIL PROTECTED] escreveu na mensagem news:[EMAIL PROTECTED] Hi All, The simple script I'm testing works on a Linux server. I got tired of having to upload and test them, so I decided to install MySQL on my computer, which is running Win XP. MySQL works fine on it's own, I've set the the database and etc., but nothing happened when I tested the page. So I googled online and found out that I was missing php_mysql.dll and libmysql.dll. So I copied them into the C:\WINDOWS\SYSTEM32 folder. Then modified php.ini in the C:\WINDOWS by uncommented the php_mysql.dll extension and changed to extension_dir to C:\WINDOWS\SYSTEM32. Rebooted and now I'm getting the following error: PHP Warning: PHP Startup: Unable to load dynamic library 'C:\WINDOWS\SYSTEM32\php_mysql.dll' - The specified procedure could not be found. in Unknown on line 0 I've checked the PATH in the System also, C:\WINDOWS\SYSTEM32 is there. So why does it work?? It's been a very frustrating day. Help anyone? Thanks. Kay -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] -- Andre Matos [EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: PHP won't connect to MySQL
I have that copied in there. Even tried a different version from the most recent MySQL download. Still getting the same error - PHP Warning: PHP Startup: Unable to load dynamic library 'C:\WINDOWS\SYSTEM32\php_mysql.dll' - The specified procedure could not be found. in Unknown on line 0 I don't get it! Kay At 09:57 AM 7/18/2006 Tuesday, João Cândido de Souza Neto wrote: I found the solution in my case. I just copy libmysql.dll from the php folder do \windows\system32 folder and everything works fine. Kay C. Tien [EMAIL PROTECTED] escreveu na mensagem news:[EMAIL PROTECTED] Hi All, The simple script I'm testing works on a Linux server. I got tired of having to upload and test them, so I decided to install MySQL on my computer, which is running Win XP. MySQL works fine on it's own, I've set the the database and etc., but nothing happened when I tested the page. So I googled online and found out that I was missing php_mysql.dll and libmysql.dll. So I copied them into the C:\WINDOWS\SYSTEM32 folder. Then modified php.ini in the C:\WINDOWS by uncommented the php_mysql.dll extension and changed to extension_dir to C:\WINDOWS\SYSTEM32. Rebooted and now I'm getting the following error: PHP Warning: PHP Startup: Unable to load dynamic library 'C:\WINDOWS\SYSTEM32\php_mysql.dll' - The specified procedure could not be found. in Unknown on line 0 I've checked the PATH in the System also, C:\WINDOWS\SYSTEM32 is there. So why does it work?? It's been a very frustrating day. Help anyone? Thanks. Kay -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Help: PHP won't connect to MySQL
At 05:37 PM 7/17/2006 Monday, Chris wrote: Kay C. Tien wrote: Hi All, The simple script I'm testing works on a Linux server. I got tired of having to upload and test them, so I decided to install MySQL on my computer, which is running Win XP. MySQL works fine on it's own, I've set the the database and etc., but nothing happened when I tested the page. So I googled online and found out that I was missing php_mysql.dll and libmysql.dll. So I copied them into the C:\WINDOWS\SYSTEM32 folder. Then modified php.ini in the C:\WINDOWS by uncommented the php_mysql.dll extension and changed to extension_dir to C:\WINDOWS\SYSTEM32. Rebooted and now I'm getting the following error: PHP Warning: PHP Startup: Unable to load dynamic library 'C:\WINDOWS\SYSTEM32\php_mysql.dll' - The specified procedure could not be found. in Unknown on line 0 You have a version mismatch in your dll's. One of them will be a dll for mysql 4 and one will be for mysql 5. You installed php5 right? The dll included with that probably won't talk to mysql 4, only mysql 5.. I'd suggest removing both and installing php5 and mysql5 from scratch. That would explain it. I'll try that. Thanks. Kay -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Help: PHP won't connect to MySQL
At 05:37 PM 7/17/2006 Monday, Chris wrote: Kay C. Tien wrote: Hi All, The simple script I'm testing works on a Linux server. I got tired of having to upload and test them, so I decided to install MySQL on my computer, which is running Win XP. MySQL works fine on it's own, I've set the the database and etc., but nothing happened when I tested the page. So I googled online and found out that I was missing php_mysql.dll and libmysql.dll. So I copied them into the C:\WINDOWS\SYSTEM32 folder. Then modified php.ini in the C:\WINDOWS by uncommented the php_mysql.dll extension and changed to extension_dir to C:\WINDOWS\SYSTEM32. Rebooted and now I'm getting the following error: PHP Warning: PHP Startup: Unable to load dynamic library 'C:\WINDOWS\SYSTEM32\php_mysql.dll' - The specified procedure could not be found. in Unknown on line 0 You have a version mismatch in your dll's. One of them will be a dll for mysql 4 and one will be for mysql 5. You installed php5 right? The dll included with that probably won't talk to mysql 4, only mysql 5.. I'd suggest removing both and installing php5 and mysql5 from scratch. Well, I reloaded both new versions. Still the same error! What gives?! sigh Kay -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Help: PHP won't connect to MySQL
Hi All, The simple script I'm testing works on a Linux server. I got tired of having to upload and test them, so I decided to install MySQL on my computer, which is running Win XP. MySQL works fine on it's own, I've set the the database and etc., but nothing happened when I tested the page. So I googled online and found out that I was missing php_mysql.dll and libmysql.dll. So I copied them into the C:\WINDOWS\SYSTEM32 folder. Then modified php.ini in the C:\WINDOWS by uncommented the php_mysql.dll extension and changed to extension_dir to C:\WINDOWS\SYSTEM32. Rebooted and now I'm getting the following error: PHP Warning: PHP Startup: Unable to load dynamic library 'C:\WINDOWS\SYSTEM32\php_mysql.dll' - The specified procedure could not be found. in Unknown on line 0 I've checked the PATH in the System also, C:\WINDOWS\SYSTEM32 is there. So why does it work?? It's been a very frustrating day. Help anyone? Thanks. Kay
suggestions
Hi All, I'm still kind of new to this, so I'm looking for suggestions on how to do this one. I need to recode this site that was designed using the old WebCatalog program which we will be phasing out soon. Here's the link to a page I need help on: http://die-broke.com/books.tpl What's the simplest way to code this? Much thanks. Kay -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
re: suggestions
At 02:16 PM 6/15/2006 Thursday, Rob Desbois wrote: I'm still kind of new to this, so I'm looking for suggestions on how to do this one. I need to recode this site that was designed using the old WebCatalog program which we will be phasing out soon. Here's the link to a page I need help on: http://die-broke.com/books.tpl What's the simplest way to code this? How long is the piece of string? --Rob Rob, I think it's listed by the corresponding SKU numbers - 17 digits. Is this what you're asking? Kay -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]