I have this connection string in a classic ASP application:
strConn = "driver={MySQL ODBC 3.51 Driver}; server="&MySQLSVR&"; port="&MySQLPRT&";User="&MySQLUID&";Password="&MySQLPWD&"; Database="&MySQLDB&"; option="&MySQLOPT & ";"
Set oconn = Server.CreateObject("ADODB.Connection")
oconn.Open strConn
Where MYSQLSVR = "127.0.0.1".
However, I can't find the MySQL database (named as in MYSQLDB string). I thought MySQL databases had the .sql extension (or .txt instead) but I found no such files.
开发者_StackOverflow中文版Am I doing this incorrectly, or does the database just not exist anymore?
MySQL's data files are either:
MyISAM - *.frm, *.myd, *.myi
InnoDB: *.frm, ib_data*, ib_logfile*
.sql
files are usually just the output of mysql_dump, and are text files containing literal sql commands.
Sorry but a MySQL database is not just "a file", unlike a Microsoft Access database.
If you want to use it in your computer you need to install a program called MySQL Server and configure it with a MySQL client:
- Create users with passwords
- Create databases
Once you have that up and running, you may be able to load your application database through *.sql files (given that the guy you work for has such thing, and he apparently doesn't).
Perhaps the application is hosted somewhere else and you are supposed to connect remotely?
You won't find any readable data files for a mysql installation. The binary files are generally located under $MYSQL_HOME/data/mysql.
精彩评论