Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    MYSQL


SuperbHosting.net have generously sponsored dedicated servers to ensure a reliable and scalable dedicated hosting solution for BigResource.com.





Accessing Mysql Database From Php File


I can access mysql in dos with the command of c:mysqlinmysql -u root mysql but when i write the command of mysql_connect ("localhost", "username", "password") i don't know what my username or password is.

I have installed Apache to run the mysql database and php on my computer although I don't know where to find out the username and password so if someone could help that would be great.




View Complete Forum Thread with Replies

Related Forum Messages:
Accessing MySQL Database.
I have recently installed MySQL 5.0.27 / PHP 5.2.0 / Apache 2.2.3 on an XP os.

I created an empty database via the MySQL command line which is visible when I type SHOW DATABASES at the mysql prompt.

I have changed my root password which works OK.

I set up the password to the empty db by:

GRANT ALL ON database name.*
TO username@localhost IDENTIFIED BY 'password'

To access the db, when I type :

mysql -D dbname -u username -p

I do not get a prompt to enter the password.

View Replies !
Accessing Remote MySQL Database
Is it possible to access remote MySQL databases?

I manage several sites and I will soon be building a tool that can track all of them, and it would be really convenient if I could somehow access all of the databases from one remote site.

View Replies !
Accessing A Mysql Database On A Remote Server
i would like to know how to connect to a remote mysql server which is on linux from a windows system. I gave the command:

mysql -u root -p redhat -h 192.168.1.132, where the ip is the ip of the linux server. But i got the error message stating that :-

Host 192.168.1.114(which is my system ip) is not allowed to connect to this MySQL server.Sreejith

View Replies !
ACCESSING A FILE
I have installed MySQL version 5.0.41-community-nt on my machine using a windows installer. The tut was done using version 4.1. I was able to follow everything in it up until the last two steps of the tut. I was trying to create a table called "createnamestable.sql" within the "test" database by creating it in notepad, pasting the following code in it:

CREATE TABLE Names (
ID INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
FirstName TINYTEXT NOT NULL,
LastName TINYTEXT NOT NULL
);

Then place it in any folder and then try to open it with the following syntax:
C:Program FilesMySQLMySQL Server 5.0data estcreatenamestable.sql;

To my surprise it did not work. I thought that putting the "createnamestable.sql" file in the same folder as the "test" database would help but it didn't
The errors I get are:

Error:
Unknown command 'D' .

Error:
Unknown command 'M'

Error:
Unknown command 'M'

I don't know what else to do. is the syntax that I used wrong for my version of MySQL? I would really be grateful if someone can help me out with this.

View Replies !
Database Accessing
I am created a database in one pc and i copied the database to another pc.when i try to execute on any tables in that database i am getting a error that table doesn't exists.how to solve this problem?

View Replies !
Accessing Only Part Of A Database Value
I'm currently writing a form where a user will input the first three characters of a postcode.

In my database I have registered users full postcodes, but when I run my query I only want to match the from the form to the first three letters of the database value.

View Replies !
Users Accessing MysSQL Database
How can my clients access a web MySQl database using client tools lke Access, OpenOffice base, etc?

View Replies !
Warning When Accessing The Database In Server
I got this warning when i tried to access the file. It's like : Warning

Changed limits: max_open_files: 2048 max_connections: 800 table_cache: 619

contact www.mysql.com blah blah blah

I dont know what happened and what should i do?

View Replies !
Trouble With Accessing Database -- Too Many Rows?
The database is used for an online game. One of the tables keeps track of all the lands in the game. There are 7 continents, each with a different set number of regions (239 in total). Each region has 625 sectors, and each sector contains 25 lands. The total number of rows in the database is 3,734,375. I recently populated the table with the necessary rows. The table comes out to over 93MB. I've already modified the structure of the table to maximize the space usage. I had no problems accesses my database before populating the world. However, now that I have, I can't access the database as a whole. I can send queries to select certain tables (such as the user table), and even check out the individual table structures in phpMyAdmin. But it locks up every time I try to connect to the database directly (ie selecting the database using phpMyAdmin or connecting through the game). I suspect it's because of the huge amount of data in the database. I tried to send a query to delete all the records in the land table, but it doesn't go through and just locks up.

View Replies !
Accessing Remotely Hosted Database (ODBC)
I am developing an IVR application and will host it in-house. The application will need to access MySQL database which is hosted remotely in a web server. How could I access remote MySQL database using ODBC?

Does the web server have to support SSH?


View Replies !
Auto Script Returns Error Accessing Database
I have a shopping cart with an automatic installation script. Add a new
database without tables, configure the script with the table's
user/password, and it's supposed to set up all the tables in the database.

Yet each time I call the setup program, I get this error:

DataBase Error, mySQL Error Reason :
Access denied for user: 'username@domain.com' (Using password: YES) at
/home/webadmin/[omitted]/cgi-bin/[omitted].pm line 109

The password appearing in the script is definitely not "YES" and I have
checked to ensure that the script contains the correct user and password
for the database.'

View Replies !
Capture IP Addr Of Network Users Accessing Database
I'm running MySql 5 and PHP 5, along with Apache2 on a winxp box. My database has info that needs to remain confidential, and as an extra security measure, I want to capture the dsn of the network users performing transactions. I have Apache configured to do this, but how do I get that data into my databse, so that I can match a transaction to a specific terminal at a specific time? I suspect somebody has already answered this, but I figure I haven't googled the right question. I am also capturing the user name and the time of each transaction, but that is pretty straightforward.

View Replies !
File In Mysql Database
Is there a way to import a file into a mysql database?
If so please let me know

View Replies !
Exported Mysql Database With TMD File?
I've got an exported database from an external system. It's in the
format of MYI, MYD and frm extension files. However, one table in this
database has book.frm, book.MYD, book.MYI _AND_ book.TMD.

When I've created a database in phpmyadmin/mysql, moved all the files
into the proper directory, every table can be looked at and selected
but this book table states that it's in use. When I try to browse it,
it states that the book.MYI cant be opened!

View Replies !
How To Restore A Mysql Database From A .bck File
i am trying to move my site to a new host. the mysql database was backed up to a .bck file nightly and i would be most appreciative if one of you could inform me of how to restore it?

View Replies !
How Do I Import .csv File Into My Mysql Database?
I woould like to know how to import csv files into my mysql databse, I tried the:

LOAD DATA LOCAL INFILE '/importfile.csv'
INTO TABLE test_table
FIELDS TERMINATED BY ','
LINES TERMINATED BY ''

Commands but I dont know where would i put these command and wher do put the "importfile.csv", what directory and location?

View Replies !
MySQL File / Database Structure
I have a question about the file structure of mysql. Where are the users as e.g. root stored?

When I make a fresh install of mysql I have the datamysql database in place then I add a secound database e.g. test. Is the root user stored then in both databases or is he only in the mysql database or somewhere else?

And if I change the password for the user root with the cmdline tool mysql is it necessary to select a database before with "use XXX" or not?

And if I wanna start from scratch on an running mysql server and therefore delet the datamysql database is the root user lost then and how I recreate all I need then?

View Replies !
Load .sql File Into New MySql Database
I am not sure how to proceed with this problem. I have just installed MySql onto my machine and that seemed to go ok. I have created a database with a username and password also. I have a file from a friend (for real!). It is a .sql dump file?, which looks like it has several commands in it such as: CREATE TABLE `games`, INSERT INTO `games` VALUES("values"), CREATE TABLE `results`, and INSERT INTO `results` VALUES ("more values"). How do I load this file into my empty database?

View Replies !
MySQL Database File Location
I have a Windows 2003 Server and have installed MySQL 4.3.13-nt on it.
I want to create 3 databases on it called d_one, d_two and d_three etc.

My problem is that I want to use separate folders for each database. Let’s say,
I want to store the database files for d_one at c:database1 folder, d_two at d:database2 folder and database d_three at e:database3 folder.

Is this possible to achieve this? If yes then can I get some guidance on how to go about this.

View Replies !
Import .xls File Into A Mysql Database
I have a .xls file that i would like to import into a mysql database, I am ok creating the mysql table in phpmyadmin on my webspace but i cant work out or find any useful tutorials on how to import the database from the .xls format and get it into the database short of building a form and submitting by hand which would take far to long.



View Replies !
Import Excel File Into Mysql Database
I was looking for information on how to import an excel file or other text file into a MySql database. I have done this with both access and SQL Server and am looking for a way to do this in MySql. I have several hundred items i want to import into a parts database that is currently in an excel file but can be saved as comma separated or other format.

View Replies !
Restore Mssql Bak File To Mysql 5.1 Database
Currently, I am having a backup file of MSSQL server 2005 database. I want to restore the backup file(of MS Sql server 2005) to MYSQL database.

Please Note: I don't have MS sql server 2005 database.

How can I do it?

View Replies !
Error When Importing .sql File Into Mysql Database
When i try to import a .sql file into a new script in the query browser (a script that inserts about 45,000 records into the tables ive created) i get the following error:

'Error: you have an er in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near "Ylvisa' at line 1 (1064)'

I have looked at both lines and searched for the area that contains "Ylvisa', but i see no errors in the syntax.


View Replies !
Accessing Dev.mysql.com
I'm trying to download MySQL4.1 from the MySQL site and when I try and
go to the download section on the site it either fails or, if it loads,
the "pick a mirror site" links always fail.

By "fail" I mean that it doesn't manage to retrieve the requested page,
either sticking on "waiting for dev.mysql.com" or "connecting to
dev.mysql.com" in the status line of the browser, eventually giving up
with an "operation timed out" error message.

Is anyone else having this problem or is it just me? - this has been
ongoing for the past couple of days now.

Incidentally, I need a version of MySQL that can handle subqueries yet
I'm still using glibc-2.2.5-40 and Redhat 7.3 (upgrading simply isn't an
option right now) - can anyone suggest a stable sub-version of 4.1 that
fits this criteria?

View Replies !
Accessing MySQL From VB6
Does anyone know how to access a MySQL server from vb6?

View Replies !
How To Import Csv File (generated By Openoffice) To Mysql Database?
how to import csv file (generated by openoffice) to mysql database?

View Replies !
Verifying Connection To MySQL Database In A Batch File
I have a Windows batch file that I'm using to call another batch file that connects to my MySQL database. The password is obtained from the user via a prompt and passed into the 2nd batch file where the connection to the database is made.

I'm having a hard time figuring out how to verify that the user entered the correct password. How would I go about testing the connection in the 1st batch file before calling the 2nd batch file?

View Replies !
Database Error Storing File: MySQL Server Has Gone Away
The following thread shows exact same error I am having but without a resolution. I am going through the same example of the book he refers to in the thread. I guess if I cant store a file that is large in mysql how do you get it do it is stored on the filesystem and a pointer to that file added to mysql?

http://www.sitepoint.com/forums/show...A+MySQL+server

View Replies !
Method For Importing Large Database File To Mysql
I use phpMyAdmin on my shared hosting accounts.
On my development computer I have a large mysql table (270MB) that I want to import into the website database. I believe LOAD DATA won't work for this size and I don't think copying/pasting 600,000 INSERT statements into the SQL query box makes sense (maybe it does?).
Has anyone been successful getting importing a large file into mysql?

View Replies !
Accessing MySQL DB From Another Domain
what is the best way to access data in a MySQL database on one domain from a PHP script on another.

We have a secure (SSL) server on one domain which will be used for secure credit card transactions. We would like to be able to extract insecure contact information from MySQL database on another domain in another hosting environment.

View Replies !
Accessing MySql On Yahoo
I have never used MySql before.I program in C# and Visual FoxPro against
MS SQL on a corporate network.
I have a Yahoo web page, and I'm going to use their MySQL DB.
I want to run queries, Inserts, Updates and Deletes.
I have no idea how to connect to MySql on Yahoo from a client like
C# or VFP.


View Replies !
Accessing Mysql From Another Host
New install of mysql on Solaris 10 x86.

I cannot connect from any other host, lots of traffic on google with people with the same error. Talk of the grant command fixing this, but no details. So simple question.

What "exactly" do I type to allow connections to port 3306 from another host to avoid messages such as

ERROR 1130 (00000): Host 'am-ms-t.foo.baa' is not allowed to connect to this MySQL server

View Replies !
Accessing MySQL Data
This morning when I tried to access my MySQL installation through MySQL Query Browser, all schemas have a message stating "Fecthing Data..." when I expand the schema. If I access MySQL through the command line, I get the following message when I execute a "use" command:
"Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A"
If I execute mysql using "-A", then it appears I can access the data, but it's very slow. Has anyone experienced this and if so, do you know how to resolve it?

View Replies !
Accessing Mysql Server On LAN
I have a problem accessing mysql server on my LAN: i can access it locally but not from other machine.


The error is: Lost connection to mysql server during query.

I've disabled the firewall but it's still not working. What i don't know is if i set the users correctly...

View Replies !
Accessing A Mysql DB Remotely
I am building a kiosk which uses a lockdown browser. The browser uses a php page to access a MySQL DB on a web server. It will not allow me to connect to the DB because I am using the following connection string:

mysql_connect("localhost","*****","*****");
mysql_select_db("******") or die ('I cannot connect to the

database because: ' . mysql_error());

I know that the problem here is that I'm trying to connect to 'localhost' when the actual DB resides elsewhere. The question I'm asking is how to find out how to connect to my DB. Is it just mysql.mydomain.com instead of localhost or what?

View Replies !
Error 1130 When Accessing MySQL From Another IP??
I am trying to run the MySQL DB on a Linux machine that is part of a home
LAN (IP=192.168.0.3), while trying to access it from another WinXP machine
(IP=192.168.0.5). I keep getting the following error:

MySQL Error Number 1130
#HY000Host '192.168.0.5' is not allowed to this MySQL server

Ping works fine.

On searching the internet, I find reference to "allow list" hidden somewhere
in the guts of MySQL. Can anyone provide me hints on how to add to this
list?

View Replies !
Accessing MySQL On Linux From Window
Is it possible to have a visual basic application running under windows and
access MySQL database on a Linux box?

Any extra drivers required for this?

View Replies !
Accessing Mysql After Fresh Installation
I have recently installes mysql -4.0.0.1 on my redhat 7.1 machine . After
installing when enter into mysql it gives me message " Access denied for
user root@local host .......using password yes"

i have tried all the options like

#mysql -u root -h localhost
#mysql -u root -h localhost -p
#mysql -u root -h localhost -p mysql
#mysql -u root -h localhost test -p
#mysql -u root -h localhost test
#mysql -u root
#mysql -u root mysql

but none of the option is working at all.

Please any idea how i can change the root password or enter the mysql after
fresh installation.

View Replies !
Accessing Mysql Programs Remotely
Is there any method you can use to access the mysql programs (mysqld, mysqladmin etc) from a remote computer? Or do they need to be ran on the server itself?

View Replies !
Accessing Mysql From Command Prompt
The path to my mysql installation is "C:Program Filesxamppmysqlin".

I want to run myisamchk - to do this I think I have to access it via the command prompt.

A stupid question - I kmow - but how do I get to the directory in a DOS window??

View Replies !
Accessing Mysql/bin Directory Problem
This may be very basic question, that I hope some of you can answer very quickly for me. I'm running mysql 4.1 on windows xp just to learn the database, and I'm in a need to run .exe in the bin directory. The problem I'm having is accessing this directory. The path is C:/Program Files/Mysql/Mysql server 4.1/bin but when I get to C:/cd "Program Files/..." I get an error message saying (parameter format not correct - "program) i have tried several things, as well as following a user guide for changing directories that states that if the folder name has spaces use " to access that subfolder...maybe there is a simple tip ...

View Replies !
What Is The Best File Type To Output For A MSWord Mail Merge From A Mysql Database?
I'll be working on a project soon which will involve outputting a list of names and addresses from a database, these will then be used in an MS Word Mail Merge. I need to know how best to create the file for use as a datasource in the MM.

So far I have found that a fairly easy method is to output a txt file which contains a tab delimited list of the names and addresses. This can then be used as a datasource in MSWord, afterwhich fields can be selected and the Mail Merge created.

I've not coded any of this so far, I've only created the text file manually. I was wondering though, how do you get carriage returns into the address? At the moment when I used the file, the addresses all appear on one line?

View Replies !
How The Field Of Mysql Table To Be Hyperlinked To Some Url When Accessing.
I have mysql table in which there is some field, in which there is four letter code like "1aed" , it is to be access through php script, and it is accessing, when four lletter code is accessed, how it should be made hyperlinked to some url.

View Replies !
Accessing MySQL BLOB Columns Using Visual C#
I am trying to write an image file to a remote MySQL Database. The following code show the section I try to save the ImageArragy into the MySQL BLOB column. The error that I am getting is : Can someone tell me where I am going wrong and how I can fix this problem?

View Replies !
Image Storing And Accessing In Mysql Table
How to store Images in mysql table and accessing

View Replies !
Accessing Data On An SQL-Server By Using MySQL-Select
is it possible to access data located in a SQL-Server-Database by using a MySQL SELECT-Statement?

I know that on an I can use a qurey like the following

SELECT *
FROM OpenDataSource( 'Microsoft.Jet.OLEDB.4.0',
'Data Source="c:Financeaccount.xls";User ID=Admin;Password=;Extended properties=Excel 5.0')

on an MS-SQL-Server and search for something similar in MySQL.

View Replies !
Accessing MySQL By A Client-side Application
I'm going to start an application that runs in a desktop computer but access data on a MySQL server in a remote computer (internet).

View Replies !
Accessing MySql Thru Coldfusion - Password Problem
I have downloaded MySql 5.0 for Windows (XP) and MySqlCC so I can interact with it. When I installed MySQl I created a username and password which I can see in "my ini" file. I don't remember creating any passwords through mysqlcc.

I am building a database driven website using "macromedia studio MX" and am experiencing problems accessing my Mysql database through that software - I keep getting asked for a login ID and password, and for the life of me, have no idea what they are.

1. When I originally added my database as a 'data source' in Cold Fusion (MX 6.1 administrator) it would not let me create a password. I kept getting error messages like "The root cause was that: java.sql.SQLException: Invalid authorization specification: Access denied for user: 'martin'@'localhost' (Using password: YES)" etc etc etc variations on that theme. (adding the database without a password wasn't a problem)

2. Now I am trying to create a dynamic page in Dreamweaver (using Coldfusion) to display my data – there is a 6 point process in the ‘server behaviors’ tab and I’m up to the last one “press the (+) plus button and choose ‘Recordset (Query).

WHEN I SELECT MY DATABASE AS A DATA SOURCE IT ASKS ME FOR A "LOGIN ID" AND "PASSWORD."

I've tried all the passwords I can think of that I used and nothing works, the error message I get is:
"-1:Syntax error or access violation: 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 'wine like '%' at line 1. this is then followed by about 27 lines of commands like "at org.gjt.mm.mysql..".bladedblahdeblah "
(I am creating a database of wine tasting notes)

View Replies !

Copyright © 2005-08 www.BigResource.com, All rights reserved