Jump to content

ddd1600

Members
  • Posts

    10
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

ddd1600's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Oh yeah, this too <?php $link = mysql_connect(`192.168.0.8`, `notexistentuser`, `thisisnotmypassword`); if (!$link) { die("Could not connect: " . mysql_error()); }else{ echo "this is working"; } ?>
  2. shit like this <?php $link = mysql_connect(`192.168.0.8`, `ddd1600`, `thisisnotmypassword`); if (!$link) { die(`Could not connect: ` . mysql_error()); }else{ echo "this is working"; } ?> Again, this might have something to do with this (http://www.phpfreaks.com/forums/index.php?topic=355485.0) And yes, that one says its working too
  3. Here's the code: <?php $link = mysql_connect(`192.168.0.8`, `ddd1600`, `thisisnotmypasswordfml`); if (!$link) { die(`Could not connect: ` . mysql_error()); }else{ echo "this should not work"; } // make foo the current db $db_selected = mysql_select_db("test", $link); if (!$db_selected) { die (`Could not connect: ` . mysql_error()); }else{ echo "It worked!"; } $sql = "INSERT INTO `test`.`Table2` ( `ID` , `name` , `content` ) VALUES ( NULL , `apples`, `are grown by Australians.`);" ; ?> OUTPUT: "this should not workIt worked!" A related post of mine, which might have something to do with this, is here: http://www.phpfreaks.com/forums/index.php?topic=355486.0
  4. So this is sort of a story: - About an hour ago I logged into phpmyadmin to a warning message, advising me to put a password on my root user(s). I did so, and immediately was locked out. So I hit the forums and found a solution to THAT problem, by altering the "config.inc.php" file. I changed the first block of text to this (real pw has been edited out): $cfg['Servers'][$i]['auth_type'] = 'config'; $cfg['Servers'][$i]['user'] = 'root'; $cfg['Servers'][$i]['password'] = ''; $cfg['Servers'][$i]['password'] = '[passwordremovedforforum]'; $cfg['Servers'][$i]['extension'] = 'mysql'; $cfg['Servers'][$i]['AllowNoPassword'] = false ; So now, again, I'm just locked out of the privileges section of phpmyadmin, which I imagine is something I should fix tonight before I revisit it in a few days and get even more angry. Thanks guys
  5. WOW. That is ridiculous. So first I changed all '..'s to `...`. But then it said "no host selected" (but no error message). So then I changed `test` to "test" and BAM! "It worked!" I was really started to get depressed thanks guys problem resolved!
  6. Oh I know that, I didn't include the mysql>. Anyway, here's the error message: "#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''mysql'.'user'' LIMIT 0, 30' at line 1
  7. I tried running that several times through the SQL cmd prompt on phpMyAdmin, but got a syntax error message every time. It especially doesn't like that 'mysql' bit. Anyway, I'm not sure if this is the same thing, but under Privileges in phpMyAdmin I've verified the existence of user "ddd1600", which has all permissions.
  8. mysql is being hosted on a computer in my local wifi network (in my apartment). The server is sitting right next to me on a different PC. That IP is the private IP for the server in the network. UPDATE: - Great, so I dropped the http://, and now have a new error message. Thanks for the quick response guys - I'm not sure if this helped or not, but I added a separate user on phpMyadmin with the host "127.0.0.1" in addition to the "localhost" one. Here's the new error message: Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'ddd1600'@'SERVER' (using password: YES) in C:\xampp\htdocs\PhpProject1\test.php on line 4 Could not connect: Access denied for user 'ddd1600'@'SERVER' (using password: YES) NOTE!!! : I added a password
  9. I'm just doing a tutorial, learning PHP/mySQL for the first time, and have been having problems getting PHP to talk to mySQL, so to speak. The tutorial is from here: Here is the code: <?php $link = mysql_connect('http://192.168.0.8:3307', 'ddd1600', ''); if (!$link) { die('Could not connect: ' . mysql_error()); } // make foo the current db $db_selected = mysql_select_db('test', $link); if (!$db_selected) { die ('Could not connect: ' . mysql_error()); }else{ echo "It worked!"; } $sql = "INSERT INTO `test`.`Table2` ( `ID` , `name` , `content` ) VALUES ( NULL , 'apples', 'are grown by Australians.');" ; ?> My server is on my private network, by the way. Thanks! PS: If it helps, here is the error message from Chrome browser or any other browser: Warning: mysql_connect() [function.mysql-connect]: php_network_getaddresses: getaddrinfo failed: No such host is known. in C:\xampp\htdocs\PhpProject1\index.php on line 4 Warning: mysql_connect() [function.mysql-connect]: [2002] php_network_getaddresses: getaddrinfo failed: No such host is known. (trying to connect via tcp://http:3306) in C:\xampp\htdocs\PhpProject1\index.php on line 4 Warning: mysql_connect() [function.mysql-connect]: php_network_getaddresses: getaddrinfo failed: No such host is known. in C:\xampp\htdocs\PhpProject1\index.php on line 4 Could not connect: php_network_getaddresses: getaddrinfo failed: No such host is known.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.