Questions tagged [mysql-connect]

The `mysql_connect` function opens a connection to a MySQL server.

The mysql_connect function opens a connection to a MySQL server. However, this function, along with all other mysql_* functions, are deprecated in PHP 5.5.0 and should be avoided (see the red box). Consider using prepared statements with either PDO or MySQLi instead.

192 questions
1
vote
2 answers

mysql_connect() is not getting to the correct server

I have a system with a globally open mysql connection to the local server. In one of my files I am opening an additional connection to a remote machine. Wieldly instead of trying to connect to that machine, I get an access denied message from my ISP…
AdamH
  • 13
  • 2
1
vote
1 answer

Access denied for user 'myuser'@'localhost' (Using password: NO), when I am using a password

This is my code, on a remote server: $username = 'myuser'; $password = 'password'; mysql_connect('localhost', $username, $password) or die ('blah blah blah'); And occasionally, it gives me this error: Access denied for user 'myuser'@'localhost'…
Lucas
  • 16,930
  • 31
  • 110
  • 182
1
vote
7 answers

Browser crashes when about around 4 million records entered in MYSQL

I downloaded a database that was exported to the TXT format and has about 700MB with 7 million records (1 per line). I made a script to import the data to a mysql database, but when about 4 million records inserted into, the browser crashes. I have…
OctaneFX
  • 106
  • 7
1
vote
4 answers

What is the best way to keep your MySQL credentials private in PHP?

When it comes to programming your web application in php, what is the most efficient way to prevent your MySQL information from being disclosed or discovered by another person (third party)? The information would include domain names and log in and…
1
vote
1 answer

How to install MySQL Connector C++ for Mac OS X (using Terminal)?

I downloaded the MySQL Connector/C++ source tree, which has an 'include' and a 'lib' directory. Now I'm following the README.txt. I download CMake which launches as a program with a UI. The first step of the installation…
user1116999
0
votes
1 answer

Using same session ID in ajax can't connect to MySQL DB

I have made a generic PHP script to use for an AJAX call. I have the username and password for the mysql connection stored in SESSION variables. In order to start the same session in this ajax script, I pass the session ID via post to the ajax…
jeffery_the_wind
  • 17,048
  • 34
  • 98
  • 160
0
votes
1 answer

Fetch data from database and use it to make markers in Google Maps

I am new to Javascript. I want to fetch lat-long from MySQL (more then 100) and use it to add markers on Google Maps. To do this I think i've to use php -server side programming. I am able to pass array from PHP to Javascript. Here it is …
apaleja
  • 395
  • 4
  • 8
  • 21
0
votes
1 answer

Trouble with PHP mysql_select

Ok, I've just started learning php, and for some reason the mysql_connect() and mysql_select_db() do not appear to connect to the database. I also need a good example of a mysql table, as I am not sure what to put in my table. How do I manage to…
CJ101
  • 3
  • 1
0
votes
1 answer

Could not Insert the data using VC++ in MYSQl database

am using MSvisual C++ 2008 and running the below code to insert the values to db.MYSQL server 5.1 is teh database. Could please let me know why its not inserting and let me know where was the problem.
user1133907
  • 5
  • 1
  • 3
0
votes
2 answers

I have installed WAMP Server on 192.168.1.104 System, How to connect MySql From other System Ex.: 192.168.1.5

Thanks in advance. I have Installed WAMP Server on System 4(192.168.1.104). I can Connect MySql DB from System 4 Local host. //Code: if (!mysql_connect('localhost','root', '')){ die('Could not connect: ' . mysql_error()); } The Connection is…
rkaartikeyan
  • 1,977
  • 9
  • 29
  • 57
0
votes
1 answer

Unable to establish MySQL database connection in local PHP testing environment

When I run the following page on my local development environment I'm getting a timeout error on the TCP connection. I've inherited this site recently from another developer. I've pulled all the files on the server and dropped them into my…
Ofeargall
  • 5,340
  • 5
  • 28
  • 33
0
votes
1 answer

Workaround for MySQL 'mysql_connect()' error

I am getting the following error in MySQL Warning: mysql_connect(): Connecting to 3.22, 3.23 & 4.0 is not supported. How do I get around this? My conn code is currently (excerpt) : DEFINE ('DB_USER', '*********'); DEFINE ('DB_PASSWORD',…
michaelmcgurk
  • 6,367
  • 23
  • 94
  • 190
0
votes
3 answers

getting an error message with a mysql_connect() statement

some comments preceding a mysql_connect statement are telling me to modify the values/variable name to my installation. I'm using xamp and looking in php.ini right now. don't really know where the problem is. please advise. Thanks. php: $dbhost =…
expiredninja
  • 1,397
  • 4
  • 25
  • 45
0
votes
0 answers

mysql_connect returning false even though I'm well below my connection limit

EDIT: I don't understand why my question was closed because the other question is nothing at all like my question. That's asking why we shouldn't use mysql_ functions. I'm not asking that at all. I'm asking why I'm having connections denied even…
Vincent
  • 1,741
  • 23
  • 35
0
votes
0 answers

Row size limit issue in MySQL with python (mysql-connector)

I'm trying to insert a new table as usual except that one doesn't work and I don't know why the console tells me I've hit the row limit size: There is one "INT NOT NULL AUTO_INCREMENT" column (it's 4 bytes) There is one TEXT(15000) column Every…