How do I uninstall MySQL completely?
First remove MySQL in ordinary way (using apt-get purge or yum remove). After that issue:
rm -rf /var/lib/mysql
to be sure that MySQL data is completely deleted
Related videos on Youtube
jamesTheProgrammer
Updated on September 17, 2022Comments
-
jamesTheProgrammer over 1 year
I have some data in a old MSSQL 2000 db. I am trying to move a couple tables from it to a mySQL (V 5.025) db. In the past I created a flat csv files from the MSSQL db and imported into an empty desination table in the mySQL db using this code snippet:
LOAD DATA INFILE '/moodle/sourcefile.csv' INTO TABLE tablename FIELDS TERMINATED BY ','
I would like to do a direct, programmatic selection from source, insert into destination process. I am using Coldfusion (MX) to read from the MSSQL table, which is getting the data from the source db fine.
I have created a connection object using this code:
classLoader = createObject("java", "java.lang.Class"); classLoader.forName("sun.jdbc.odbc.JdbcOdbcDriver"); dm = createObject("java","java.sql.DriverManager");
I can dump the dm object and its fine, ready to be used.
I am attempting to create an odbc connection to the mySQL table like this: This is the code that is failing.
con = dm.getConnection("jdbc:odbc:DRIVER={MySQL ODBC 3.51 Driver}; SERVER=ipaddress; PORT=3306; DATABASE='dbname'; USER='username'; PASSWORD='password'; OPTION=3;");
The error it is generating is
"[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified"
Any ideas on how to correct this error (make connection work) OR a different perspective on how to move this data is appreciated.
-
Ian Stanway over 14 yearsWhat platform? Windows / Linux / etc...
-
Leigh about 12 yearsJust curious, any reason you cannot set up a regular datasource? If you update the driver, you should be able to connect to MySQL5 from MX.
-
jamesTheProgrammer about 12 yearsdo you mean create a dsn for the mySQL db in CFIDE?
-
Leigh about 12 yearsYes, via the CF Administrator.
-
jamesTheProgrammer about 12 yearsthe CFIDE only lists MySQL(3.x) as option, I am using 5.0.25 - getting error trying to set up DSN "Connection verification failed for data source: studentMoodle java.sql.SQLException: Communication failure during handshake. Is there a server running on ipaddress:port?"
-
Leigh about 12 yearsYes, you have to update the driver and use type "Other". See the link in my previous post for the instructions.
-
jamesTheProgrammer about 12 yearsYou have been helpful, I appreciate it. Not sure what to put in the parameters in other type, specifically: JDBC URL , Driver Class , Driver Name
-
Leigh about 12 yearsYeah, not the greatest example in the article. The driver class is
com.mysql.jdbc.Driver
. Note, it is case sensitive! The driver name does not matter. The url depends on your server and port. But an example is:jdbc:mysql://127.0.0.1:3306/MyDatabaseName
-
jamesTheProgrammer about 12 yearsis the driver class a path to a file on my system? still getting error "No suitable driver available for studentmoodle, please check the driver setting in resources file, error: null"... I did install the ODBC connector referenced in answer
-
Leigh about 12 years
-
Umair Khan about 6 yearsis your problem solved ?
-
-
Sam Halicke over 14 yearsThen, remove /etc/my.cnf and $HOME/.my.cnf to destroy any lingering configuration settings.