﻿<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>Knowledgebase » Knowledgebase » Database » MySQL</title><generator>InstantKB.NET 2.0.4</generator><description>Knowledgebase</description><link>http://www.webhost4life.com/HostingKB/</link><webMaster>kb@webhost4life.com</webMaster><lastBuildDate>Fri, 20 Nov 2009 18:51:24 GMT</lastBuildDate><ttl>20</ttl><item><title>How do I connect MySQL DB with MySQL .NET connector</title><link>http://www.webhost4life.com/HostingKB/Goto50491.aspx</link><description>There is no installation required on server,  you only need to &lt;span class="t_tag" onclick="tagshow(event)" href="http://evening.mysite4now.com/tag.php?name=upload"&gt;upload&lt;/span&gt; the Mysql.Data.&lt;span class="t_tag" onclick="tagshow(event)" href="http://evening.mysite4now.com/tag.php?name=dll"&gt;dll&lt;/span&gt; to the site "bin" folder. &lt;br /&gt;You can download the MySQL .NET connector in '&lt;a href="http://dev.mysql.com/downloads/connector/net/6.0.html"&gt;http://dev.mysql.com/downloads/connector/net/6.0.html&lt;/a&gt;'.&lt;br /&gt;The MySQL.Data.dll locates on the "Installation path\Assemblies". Default path is "C:\Program Files\MySQL\MySQL Connector Net 6.0.3\Assemblies".&lt;br /&gt;&lt;br /&gt;********************************************************************&lt;br /&gt;[Sample .aspx]&lt;br /&gt;&amp;lt;%@ Page Language="VB" debug="true" %&amp;gt;&lt;br /&gt;&amp;lt;%@ Import Namespace = "System.Data" %&gt;&lt;br /&gt;&amp;lt;%@ Import Namespace = "MySql.Data.MySqlClient" %&gt;&lt;br /&gt;&amp;lt;script language="VB" runat="server"&gt;&lt;br /&gt;&lt;br /&gt;Sub Page_Load(sender As Object, e As EventArgs)&lt;br /&gt;&lt;br /&gt;    Dim myConnection  As MySqlConnection&lt;br /&gt;    Dim myDataAdapter As MySqlDataAdapter&lt;br /&gt;    Dim myDataSet     As DataSet&lt;br /&gt;&lt;br /&gt;    Dim strSQL        As String&lt;br /&gt;    Dim iRecordCount  As Integer&lt;br /&gt;&lt;br /&gt;        myConnection = New MySqlConnection("Server=mysqlxxx.mysite4now.com;Database=DBname;Uid=DB_ID;Pwd=DB_pw")&lt;br /&gt;&lt;br /&gt;        strSQL = "SELECT * From [table name];"&lt;br /&gt;&lt;br /&gt;    myDataAdapter = New MySqlDataAdapter(strSQL, myConnection)&lt;br /&gt;    myDataSet = New Dataset()&lt;br /&gt;        myDataAdapter.Fill(myDataSet, "[table name]")&lt;br /&gt;&lt;br /&gt;    MySQLDataGrid.DataSource = myDataSet&lt;br /&gt;    MySQLDataGrid.DataBind()&lt;br /&gt;&lt;br /&gt;End Sub&lt;br /&gt;&lt;br /&gt;&amp;lt;/script&gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;html&gt;&lt;br /&gt;&amp;lt;head&gt;&lt;br /&gt;&amp;lt;title&gt;MySQL test&amp;lt;/title&gt;&lt;br /&gt;&amp;lt;/head&gt;&lt;br /&gt;&amp;lt;body&gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;form id="Form1" runat="server"&gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;asp:DataGrid id="MySQLDataGrid" runat="server" /&gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;/form&gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;/body&gt;&lt;br /&gt;&amp;lt;/html&gt; &lt;br /&gt;********************************************************************&lt;br /&gt;&lt;br /&gt;In some application you require to add the following lines in web.config. &lt;br /&gt;[web.config]&lt;br /&gt;&lt;br /&gt;&amp;lt;system.web&gt;&lt;br /&gt;                &amp;lt;compilation de&lt;span class="t_tag" onclick="tagshow(event)" href="http://evening.mysite4now.com/tag.php?name=bug"&gt;bug&lt;/span&gt;="true" urlLinePragmas="true"&gt;&lt;br /&gt;                        &amp;lt;assemblies&gt;&lt;br /&gt;                                &amp;lt;add assembly="MySql.Data,Version=6.0.3.0, Culture=neutral,PublicKeyToken=C5687FC88969C44D"/&gt;&amp;lt;/assemblies&gt;&amp;lt;/compilation&gt;&lt;br /&gt;                &amp;lt;authentication mode="Windows"/&gt;&lt;br /&gt;                &amp;lt;customErrors mode="Off"/&gt;&lt;br /&gt;        &amp;lt;/system.web&gt;&lt;br /&gt;        &amp;lt;system.data&gt;&lt;br /&gt;    &amp;lt;DbProviderFactories&gt;&lt;br /&gt;      &amp;lt;add name="My&lt;span class="t_tag" onclick="tagshow(event)" href="http://evening.mysite4now.com/tag.php?name=SQL"&gt;SQL&lt;/span&gt; Data Provider" invariant="MySql.Data.MySqlClient" description=".Net Framework Data Provider for My&lt;span class="t_tag" onclick="tagshow(event)" href="http://evening.mysite4now.com/tag.php?name=SQL"&gt;SQL&lt;/span&gt;"type="MySql.Data.MySqlClient.MySqlClientFactory, MySql.Data,Version=6.0.3.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d"/&gt;&lt;br /&gt;    &amp;lt;/DbProviderFactories&gt;&lt;br /&gt;&amp;lt;/system.data&gt;</description><pubDate>Wed, 24 Jun 2009 08:57:35 GMT</pubDate><dc:creator>Mark</dc:creator></item><item><title>How to use phpMyAdmin to manage the mySQL database?</title><link>http://www.webhost4life.com/HostingKB/Goto50479.aspx</link><description>&lt;span id="ctl00_ctlContentPlaceHolder_ctl00_ctlViewArticle_ctlPanelBar_lblArticleText"&gt;You can read this &lt;a href="../KnowledgebaseArticle50066.aspx" target="_blank"&gt;article&lt;/a&gt; if you have difficulties in inputting the database information in the phpMyAdmin.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span id="ctl00_ctlContentPlaceHolder_ctl00_ctlViewArticle_ctlPanelBar_lblArticleText"&gt;To open the &lt;/span&gt;&lt;span id="ctl00_ctlContentPlaceHolder_ctl00_ctlViewArticle_ctlPanelBar_lblArticleText"&gt;phpMyAdmin&lt;/span&gt;&lt;span id="ctl00_ctlContentPlaceHolder_ctl00_ctlViewArticle_ctlPanelBar_lblArticleText"&gt;, you can browse the link, http://phpmyadmin.mysite4now.com/, with your web browser and you will seethe following page.&lt;br /&gt;( you can also open it with Hosting Control Panel -&gt; Database -&gt; MySql manager )&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;img src="/HostingKB/Uploads/Images/mysqladmin.JPG" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;font size="2"&gt;&lt;span id="ctl00_ctlContentPlaceHolder_ctl00_ctlViewArticle_ctlPanelBar_lblArticleText"&gt;To create connection to your database,&lt;/span&gt;&lt;/font&gt; please type in the database information and click on the Go button.&lt;br /&gt;&lt;br /&gt;After you login with your database user, the main page of phpMyAdmin will show up and there are many function for you to choose.  The following picture will show the simple description of links/icons.&lt;br /&gt;&lt;br /&gt;&lt;img src="/HostingKB/Uploads/Images/mysqladminmain.JPG" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;font size="2"&gt;To manage your database, please click on the link with your database name&lt;/font&gt;.  You will see the main page of your database.&lt;br /&gt;&lt;br /&gt;&lt;img src="/HostingKB/Uploads/Images/mysqladminDB.JPG" /&gt;&lt;br /&gt;&lt;br /&gt;You can create table with the bottom function by typing the new table info and clicking on "Go".&lt;br /&gt;&lt;br /&gt;You also see some icon &lt;img src="/HostingKB/Uploads/Images/mysqladminicon.JPG" /&gt;.  They represent different function to manage your table.&lt;br /&gt;Here is the list of the function.&lt;br /&gt;&lt;br /&gt;&lt;img src="/HostingKB/Uploads/Images/mysqladminbrowse.JPG" /&gt;  -  to browse your data&lt;br /&gt;&lt;img src="/HostingKB/Uploads/Images/mysqladminStructure.JPG" /&gt;  -  to manage your table structure&lt;br /&gt;&lt;img src="/HostingKB/Uploads/Images/mysqladminSearch.JPG" /&gt;  -  to search your data in the table&lt;br /&gt;&lt;img src="/HostingKB/Uploads/Images/mysqladminInsert.JPG" /&gt;  -  to insert new data to your table&lt;br /&gt;&lt;img src="/HostingKB/Uploads/Images/mysqladminEmpty.JPG" /&gt;  -  to empty your table&lt;br /&gt;&lt;img src="/HostingKB/Uploads/Images/mysqladminDrop.JPG" /&gt;  -  to drop the table from the database&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;font size="3"&gt;To run your query,&lt;br /&gt;&lt;font size="2"&gt;1) You can open the query window from the main page of phpMyAdmin,&lt;br /&gt;2) or you can click on the Query Tab in the &lt;/font&gt;&lt;/font&gt;&lt;font size="3"&gt;&lt;font size="2"&gt;database page.&lt;br /&gt;&lt;/font&gt;&lt;/font&gt;</description><pubDate>Tue, 19 May 2009 18:50:21 GMT</pubDate><dc:creator>Mark</dc:creator></item><item><title>Website using MySQL return "Too many connections" error</title><link>http://www.webhost4life.com/HostingKB/Goto50459.aspx</link><description>Your website may have established too many connections to MySQL database. When the number of open connection reach the limit, "Too many connections" error will return. &lt;br /&gt;&lt;br /&gt;To fix it temporary, you can login your Hosting Control Panel -&gt; Database -&gt; MySQL Admin, click the "Flush Host" button beside your database.&lt;br /&gt;&lt;br /&gt;* IMPORTANT: You need to check your script whether all opened connections are closed. Otherwise the same problem will occur again and again when your site being visited&lt;br /&gt;</description><pubDate>Thu, 07 May 2009 13:42:48 GMT</pubDate><dc:creator>Mark</dc:creator></item><item><title>SELECT command denied to user 'user@'xxx.xxx.xxx.xxx' 'for table 'proc'</title><link>http://www.webhost4life.com/HostingKB/Goto50449.aspx</link><description>&lt;span style="line-height: normal; white-space: pre;"&gt;Below solution is applied for MySQL Connector/ODBC 5.1.&lt;br /&gt;&lt;br /&gt;When users connect their Mysql database with Mysql .Net connector and try to create stored procedure, Mysql will return error :&lt;/span&gt;&lt;div&gt;&lt;span style="line-height: normal; white-space: pre;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="line-height: normal; white-space: pre;"&gt;SELECT command denied to user 'user@'xxx.xxx.xxx.xxx' 'for table 'proc'&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="line-height: normal; white-space: pre;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="line-height: normal; white-space: pre;"&gt;It is a bug in Mysql&lt;span style="line-height: 18px; white-space: normal;"&gt; (&lt;a href="http://"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;http://bugs.mysql.com/bug.php?id=33455&lt;/span&gt;&lt;/a&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;To fix it, please a&lt;span style="font-size: 14px; border-collapse: collapse; line-height: 22px;"&gt;dd "Use Procedure Bodies=false;" to the connection string:&lt;span&gt;     &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="line-height: normal; white-space: pre;"&gt;&lt;span style="font-size: 14px; white-space: normal; border-collapse: collapse; line-height: 22px;"&gt;&lt;br style="line-height: normal;" /&gt;"server=mysqlxxx.mysite4now.com;user id=dbuser; password=dbpassword; database=&lt;span href="tag.php?name=dbname" onclick="tagshow(event)" class="t_tag" style="border-bottom: 1px solid rgb(255, 0, 0); line-height: normal; cursor: pointer; white-space: nowrap;"&gt;dbname&lt;/span&gt;; Use Procedure Bodies=false;"&lt;br style="line-height: normal;" /&gt;&lt;br style="line-height: normal;" /&gt;ref: &lt;a href="http://bugs.mysql.com/bug.php?id=35938" target="_blank" style="text-decoration: none; line-height: normal;"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;http://&lt;/span&gt;&lt;span href="tag.php?name=bug" onclick="tagshow(event)" class="t_tag" style="border-bottom: 1px solid rgb(255, 0, 0); line-height: normal; cursor: pointer; white-space: nowrap;"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;bug&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;s.mysql.com/&lt;/span&gt;&lt;span href="tag.php?name=bug" onclick="tagshow(event)" class="t_tag" style="border-bottom: 1px solid rgb(255, 0, 0); line-height: normal; cursor: pointer; white-space: nowrap;"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;bug&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;.php?id=35938&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;</description><pubDate>Sun, 12 Apr 2009 16:58:12 GMT</pubDate><dc:creator>Mark</dc:creator></item><item><title>How do I backup my database?</title><link>http://www.webhost4life.com/HostingKB/Goto50032.aspx</link><description>&lt;p&gt;&lt;font face="Arial" size="2"&gt;&lt;strong&gt;MSSQL:&lt;/strong&gt;&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font face="Arial" size="2"&gt;1)  Login to your hosting control panel.  Click on the menu "Database".  On the left menu, click on MSSQL.&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font face="Arial" size="2"&gt;2) You'll now see a list of your mssql db.  Click on the "Backup" link next to the database that you want to backup.&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font face="Arial" size="2"&gt;3) Follow the backup steps to setup FTP Account and to Start the backup of your db.&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font face="Arial" size="2"&gt;4) FTP to the account that you just setup for your database backup and retrieve the backup.&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font face="Arial" size="2"&gt;Please note that we do backup your db on a daily basis as well.&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;font face="Arial" size="2"&gt;&lt;strong&gt;MySQL:&lt;/strong&gt;&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font face="Arial" size="2"&gt;1)  Login to your hosting control panel.  Click on the menu "Database".  On the left menu, click on MySQL.&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font face="Arial" size="2"&gt;2) You\'ll now see a list of your mysql db.  Click on the "Backup" link next to the database that you want to backup.&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font face="Arial" size="2"&gt;3) Follow the backup steps to setup FTP Account and to Start the backup of your db.&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font face="Arial" size="2"&gt;4) FTP to the account that you just setup for your database backup and retrieve the backup.&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font face="Arial" size="2"&gt;Please note that we do backup your db on a daily basis as well.&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;font face="Arial" size="2"&gt;To backup your files, please refer to &lt;a href="KnowledgebaseArticle50441.aspx"&gt;this article&lt;/a&gt;.&lt;br /&gt;&lt;/font&gt;&lt;/p&gt;</description><pubDate>Mon, 30 Mar 2009 10:11:55 GMT</pubDate><dc:creator>Mark</dc:creator></item><item><title>What do I use to connect to MySQL?</title><link>http://www.webhost4life.com/HostingKB/Goto50068.aspx</link><description>&lt;font face="Arial"&gt;You can connect your mysql database through control panel &gt;&gt; database &gt;&gt; MySQL Manager.&lt;br /&gt;&lt;br /&gt;Or you can download some GUI tools from "&lt;a href="http://dev.mysql.com/downloads/gui-tools/5.0.html"&gt;http://dev.mysql.com/downloads/gui-tools/5.0.html&lt;/a&gt;"&lt;br /&gt;&lt;/font&gt;&lt;a target="_blank" href="https://phpmyadmin.mysite4now.com/"&gt;&lt;font color="#ffffff"&gt;&lt;span style="color: rgb(255, 255, 255); font-family: Verdana,Helvetica,Arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10px; line-height: normal; font-size-adjust: none; font-stretch: normal;" /&gt;&lt;/font&gt;&lt;/a&gt;&lt;font color="#ffffff"&gt;&lt;span style="color: rgb(255, 255, 255); font-family: Verdana,Helvetica,Arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10px; line-height: normal; font-size-adjust: none; font-stretch: normal;"&gt;&lt;font color="#ffffff"&gt;&lt;font color="#ffffff"&gt;&lt;font color="#ffffff"&gt;&lt;a target="_blank" href="https://phpmyadmin.mysite4now.com/"&gt;&lt;font color="#ffffff"&gt;L Manager&lt;/font&gt;&lt;/a&gt;&lt;/font&gt; &lt;br /&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;</description><pubDate>Wed, 24 Dec 2008 11:36:24 GMT</pubDate><dc:creator>Mark</dc:creator></item><item><title>I can't login FTP to retrieve my db backup file.</title><link>http://www.webhost4life.com/HostingKB/Goto50062.aspx</link><description>&lt;font face="Arial" size="1"&gt;&lt;font size="2"&gt; Please make sure you have setup your FTPlogin first. &lt;br /&gt;&lt;br /&gt;To do so, login Hosting Control Panel -&gt; Database -&gt; MSSQL admin or MySQL admin -&gt; Backup DB&lt;br /&gt;&lt;br /&gt;You'll see that option at your DB backup/restore section (Step 1) of yourcontrol panel.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/font&gt; &lt;/font&gt;</description><pubDate>Wed, 24 Dec 2008 11:31:28 GMT</pubDate><dc:creator>Mark</dc:creator></item><item><title>How do I use MySQL with ASP?</title><link>http://www.webhost4life.com/HostingKB/Goto50043.aspx</link><description>&lt;font face="Arial" size="1"&gt;&lt;font size="2"&gt;                    For a complete tutorial please refer to this site: &lt;a href="http://www.mazsoft.com/mysql.asp"&gt;&lt;font color="#0000ff"&gt;http://www.mazsoft.com/mysql.asp&lt;/font&gt;&lt;/a&gt;                    &lt;/font&gt;&lt;br /&gt;&lt;/font&gt;</description><pubDate>Wed, 24 Dec 2008 11:02:31 GMT</pubDate><dc:creator>Mark</dc:creator></item></channel></rss>