locked
can't access database (mysql) RRS feed

  • Question

  • User-1075092149 posted

    i have developed a web application, but when i run the debug mode, error occurs about can't access database.

    below is my config file.

     <connectionStrings>    
        <add name="SupplierContext" providerName="MySql.Data.MySqlClient" connectionString="Datasource=localhost;Database=test;uid=admin;pwd=1234;charset=utf8;" />
      </connectionStrings>

    I found that my local computer does not has the mySQL database, is it I need to download a database into my local PC if the datasource=localhost

    anyone advice how can i access database according to the above config file.

    anyone give me a link which version of mySQL database i have to install. thanks.

    Wednesday, December 17, 2014 11:56 PM

Answers

All replies

  • User724169276 posted

    If your server for the database is in the same machine then providing localhost as a server should work.If the server is on different machine then you need to use that machine IP Address to access the database.If you only have a database file in your system then i think you have to install mysql in your machine.

    Thursday, December 18, 2014 12:08 AM
  • User-1075092149 posted

    If your server for the database is in the same machine then providing localhost as a server should work.If the server is on different machine then you need to use that machine IP Address to access the database.If you only have a database file in your system then i think you have to install mysql in your machine.

    for the first post, i have attached some code from my webconfig file. according to my code, is it i have to install mySQL into my local PC, if yes, would you give me the link how can i install mySQL database and setting up the database so that i can access database from the web application.

    Thursday, December 18, 2014 12:28 AM
  • User724169276 posted

    is it i have to install mySQL into my local PC,

    Yes if you don't have any remote server where mysql is running with the database of your interest.

    would you give me the link how can i install mySQL database

    Here we go:

    http://dev.mysql.com/downloads/mysql/

    setting up the database

    https://netbeans.org/kb/docs/ide/install-and-configure-mysql-server.html

    http://www.tutorialspoint.com/mysql/mysql-select-database.htm

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, December 18, 2014 12:33 AM
  • User-1075092149 posted

    -_-

    is it i have to install mySQL into my local PC,

    Yes if you don't have any remote server where mysql is running with the database of your interest.

    -_-

    would you give me the link how can i install mySQL database

    Here we go:

    http://dev.mysql.com/downloads/mysql/

    -_-

    setting up the database

    https://netbeans.org/kb/docs/ide/install-and-configure-mysql-server.html

    http://www.tutorialspoint.com/mysql/mysql-select-database.htm

    Here we go:

    http://dev.mysql.com/downloads/mysql/

    which version i have to download from the above link

    Thursday, December 18, 2014 1:27 AM
  • User724169276 posted

    which version i have to download from the above link

    IMO 5.6 is fine.Just choose the operating system and the architecture (32 bit/64 bit) and download.

    Thursday, December 18, 2014 2:58 AM
  • User-1075092149 posted

    -_-

    which version i have to download from the above link

    IMO 5.6 is fine.Just choose the operating system and the architecture (32 bit/64 bit) and download.

    what is the different bedtween 32bit and 64bit

    Sunday, December 21, 2014 5:47 AM
  • User724169276 posted

    what is the different bedtween 32bit and 64bit

    from mysql point of view no significant difference.From OS Platform yes.That will be out of the scope of this forum.

    Sunday, December 21, 2014 8:28 AM
  • User-1075092149 posted

    Ashim Chatterjee

    -_-

    which version i have to download from the above link

    IMO 5.6 is fine.Just choose the operating system and the architecture (32 bit/64 bit) and download.

    after installed, i can only use the command prompt??

    Monday, December 22, 2014 6:03 PM
  • User724169276 posted

    after installed, i can only use the command prompt??

    you are trying to install mysql then where did cmd came from ???

    Monday, December 22, 2014 9:36 PM
  • User1428246847 posted

    after installed, i can only use the command prompt??

    You can learn something from it; and I am serious about that, you don't learn anything when using a GUI. But if you need a GUI like SSMS, you can install mysql workbench.

    Tuesday, December 23, 2014 7:15 AM