Databases :: Uploading MySql Database To A Server?
Jan 7, 2010
I have few questions regarding MySql database.
First one will be: I've installed MySql, Query broswer, and ODBC connector (not sure what this one does. Can anyone explain?)
Now, when im dragging a new DataGridView into the form, and try to connect it to a MySql database, i can't seem to find MySql in the databases list... why is that?
Second question, assuming everything works fine, how can i upload the database to a server and use it there?
I can think of two problems trying to do this : (1) Im not sure where my Database files are stored at... (for some reason, they are not found in MySql/Data... this folder is completly absent)
(2) While working with ACCESS, all i had to do is to point the .aspx page that did the connecting to the location of the .mdb file, but now, each time i want to reach my database, i need to send the page to the server (localhost). How will i create a connection to my database, when its on another server, in the code page ? (small code example would be nice).
protected void Button3_Click(object sender, EventArgs e) { //Create a connection to the database MySqlConnection conn = new MySqlConnection("Database=kid07025;Data Source=195.178.228.254;User Id=kid07025;Password=********"); //open the connection conn.Open(); //MySQL Query which updates the row where Anvandarnamn = Anvandarnamn (recieved from a cookie) MySqlCommand cmd = new MySqlCommand("UPDATE personer SET Information=?Information,Fnamn=?Fnamn,Enamn=?Enamn,Personnr=?Personnr,Adress=?Adress,Postnr=?Postnr,Ort=?Ort WHERE Anvandarnamn=?Anvandarnamn", conn); // Update with new text cmd.Parameters.AddWithValue("?Anvandarnamn", Request.Cookies["Anvandarnamn"].Value); cmd.Parameters.AddWithValue("?Information", TextBox1.Text); cmd.Parameters.AddWithValue("?Fnamn", TextBox2.Text); cmd.Parameters.AddWithValue("?Enamn", TextBox3.Text); cmd.Parameters.AddWithValue("?Personnr",TextBox4.Text); cmd.Parameters.AddWithValue("?Adress", TextBox5.Text); cmd.Parameters.AddWithValue("?Postnr", TextBox6.Text); cmd.Parameters.AddWithValue("?Ort", TextBox7.Text); cmd.ExecuteReader(); conn.Close(); RefreshProfile(); }
I don't know what I am doing wrong here, but the database doesn't get updated when I press the button.
I want to use MVC 2 with MySQL database. Is it possible?because my shared hosting limits the size of SQL Server database, but there is no limit on Size of MySQL database.MySQL seems to take less disk space than SQL Server database which is costly on the Internet.
I did all the instructions which are in the following link: [URL] in order to do a connection between MySQL database and ASP.NET but I did not successed. Sometimes, it told me that I have a mistake in the <asp: button> and sometimes it told me that I did a mistake in calling (addImage) method. And this is my whole code:-
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="HW5._Default" %> <script> public class DataAccess { private string _strConn = @"Driver= {MySQLODBC 3.51 Driver};SERVER=localhost;DATABASE=test1;"; private OdbcConnection _objConn; public DataAccess() { this._objConn = new OdbcConnection(this._strConn); } // This function adds the Images to database public string addImage(timestamp id, byte [] data,string extension) { string strSql = "SELECT * FROM File"; DataSet ds = new DataSet("Image"); OdbcDataAdapter tempAP = new OdbcDataAdapter(strSql,this._objConn); OdbcCommandBuilder objCommand = new OdbcCommandBuilder(tempAP); tempAP.Fill(ds,"Table"); try { this._objConn.Open(); DataRow objNewRow = ds.Tables["Table"].NewRow(); objNewRow["Extension"] = extension; objNewRow["Data"] = buffer; objNewRow["ID"] = id; ds.Tables["Table"].Rows.Add(objNewRow); // trying to update the table to add the image tempAP.Update(ds,"Table"); }.....................................
I have the following piece of code in my web.config file.. I am trying to connect to a MySQL database. The code compiles fine and when I am ruuning the website I come across this error - 'Keyword not supported: 'server'.':
My employer is changing hosting providers.Our current hosting provider offers MSSQL which we use for the database used on our website. The host we are changing to is insisting that we switch to MySQL because they only offer an older version of MSSQL and are concerned about compatibility issues.I have absolutely no experience working with MySQL and am a novice with MSSQL as well. What is the best way for me to port a database from one to the other?I have downloaded MySQL and Workbench... I've also downloaded the .Net connector as a zip file but am not sure where to extract its contents.
How to place a MYSQL database in my ASP.NET site?In what format I produces the file to my APP_DATA database folder to place it.
How to build CONNECTION STRING to database located in APP_DATA.I created a site conncted with a LOCALHOST database.Now I want to import it into my website folder APP_DATA
Im hosting my site over at some ISP, and when i try to use INSERT or UPDATE procedure, i get this error : "SELECT command denied to user 'KidumMac'@'localhost' for table 'proc' "Which is really wired for two reasons:
A. In my code i don't reference whatsoever to the MySql databse, nor the "proc" table B. In the myPHPadmin program the queries work just fine. Any insights?
the second problem is that when i try to import my database, the tables import fine, but when it gets to import the stored procedure, it tells me that the user needs SUPER PRIVILEGES for that. what is it ?
I am using a simple Login function and need to record individual field values from MySQL database to compare with inputs.
My connection code:
Dim myConnection As MySqlConnection Dim myDataAdapter As MySqlDataAdapter Dim strSQL As String myConnection = New MySqlConnection("Database=mydatabase;Data Source=xx.xxx.xx.x;port=3362;UId=myID;Password=1234;") strSQL = "SELECT username,password FROM Login WHERE ID = '" & 1 & "'" myDataAdapter = New MySqlDataAdapter(strSQL, myConnection) myDataSet = New Dataset() myDataAdapter.Fill(myDataSet,"Login")
I have confirmed it is connecting by adding the following GridView.
I can check whether username exists or not successfully but not for email. any ideas why it isn't working? Error message was that i did not close my connection. using System;
I am trying to develop a page where I am trying to search a database (MyQSL) and display the data in a table format. Some of the database entries, like category, is stored as integer values, but I want to display the category name in the search result (not the corresponding integer value). I have also another issue, every time I change the dropdown list values (which are having "auto postback" enabled) the <EmptyDataTemplate> is returned. At this moment I am using GridView. But I am ready to change this to any other method, like repeater or whatever...
System.Data.Odbc.OdbcException: ERROR [HY000] [MySQL][ODBC 3.51 Driver]Can't connect to MySQL server on '127.0.0.1' (10048)ERROR [HY000] [MySQL][ODBC 3.51 Driver]Can't connect to MySQL server on '127.0.0.1' (10048)
I have Connector/NET working on my windows 2008 web server. We are moving the MySQL DB from localhost on that windows 2008 server to a new Linux server. The tables are copied over. I can connect to them in the cmd line using all the same credentials.
When I try to connect via my ASP.NET application I get the ambiguous Error:
"Unable to initialize provider. Missing or incorrect schema."
I have a problem that currently we are use a sybase database and we want to create application that give me a output in excel report that's mean my data stored at sybase or mysql and we access it from this after it generate my report in excel form and give this output on excel format?
I have used ASD.NET code using SQL Database for Transaction operation successfully. By changing the Database Code to interface with MYSQL an Error occurs. If I remove the Transaction Code from within the the application, it works OK by displaying the MYSQL data (Read Only) in the layout of the application. I am using Mysql Essential-4.1.22-win32 and MYSQL Connector ODBC-3.51.2. My objective is to EDIT the MYSQL Data.
i have successfully showed data using puting directpath in to a textbox(e.g, filename=TextBox1.Text;). but the code above is not working. i dont know why.