Pergunta

I am using c# on monodevelop on Ubuntu x64. I am trying to use Mono.Data.Sqlite to connect to a local (localhost) database but I cant connect to it. This is my connection string:

 string connsqlstring = "Server=localhost;" + 
"Database=wsep;" + "User ID=root;" + "Password=1234;" + "Pooling=false";

But I keep getting:

System.Data.SqlClient.SqlException: Server does not exist or connection refused.

I have started the server (sudo /etc/init.d/mysql start) What am I missing?

Foi útil?

Solução

Simply put, SQLite isn't the same thing as MySQL. They're different databases.

SQLite is a flat file database, the mono side of which you can read about here.

MySQL has information on the mono website and that page also provides links to downloading the MySQL connector for use with your mono projects. You will want to look at these links for working with MySQL.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top