<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
<title>Web Development &gt; Database Programming and Administration</title>
<link>http://www.topwebhosts.org/bbs/board.php?bo_table=database</link>
<description>Å×½ºÆ® ¹öÀü 0.2 (2004-04-26)</description>
<language>ko</language>
<item>
<title>Ecommerce Website Development</title>
<link>http://www.topwebhosts.org/bbs/board.php?bo_table=database&amp;wr_id=33</link>
<description><![CDATA[Hello<br/>I want to know about the latest techniques of Ecommerce Website Development. So please help me out.<br/>Thanks a lot.<br/>For more info please visit:<A HREF="http://www.impingesolutions.com/" TARGET='_blank'>http://www.impingesolutions.com/</A>]]></description>
<dc:creator>impinge</dc:creator>
<dc:date>Thu, 21 Jul 2011 22:18:59 -0500</dc:date>
</item>
<item>
<title>How To Determine MyISAM Or Innodb Engine</title>
<link>http://www.topwebhosts.org/bbs/board.php?bo_table=database&amp;wr_id=31</link>
<description><![CDATA[How do you determine whether a MySQL table is MyISAM or InnoDB?]]></description>
<dc:creator>scott</dc:creator>
<dc:date>Thu, 12 May 2011 04:05:11 -0500</dc:date>
</item>
<item>
<title>ERROR 1146 (42S02): Table â€˜mysql.serversâ€™ doesnâ€™t exist</title>
<link>http://www.topwebhosts.org/bbs/board.php?bo_table=database&amp;wr_id=29</link>
<description><![CDATA[After upgrading MySQL from MySQL 5.0.77 to 5.1.47, we are getting the "ERROR 1146 (42S02): Table â€˜mysql.serversâ€™ doesnâ€™t exist" error whenever we run "flush privileges" MySQL command. We cannot insert a new privileged user, and make the user effective.<br/><br/>This occurred on Server version: 5.1.47 MySQL Community Server (GPL) by Remi, installed on CentOS whenever I would execute the &#039;FLUSH PRIVILEGES&#039; command.]]></description>
<dc:creator>scott</dc:creator>
<dc:date>Thu, 16 Dec 2010 16:51:14 -0600</dc:date>
</item>
<item>
<title>MySQL case sensitive problem on Linux after migrating from Windows</title>
<link>http://www.topwebhosts.org/bbs/board.php?bo_table=database&amp;wr_id=26</link>
<description><![CDATA[We have a POS software custom developed for <a href="http://www.kingspausa.com">King Spa</a>, which is based on open-source Openbravo POS. Due to the <a href="http://dev.mysql.com/doc/refman/5.0/en/gone-away.html">Mysql server has gone away</a> problem on Windows, we migrated the database to Linux. The Openbravo POS v2.2 uses mixture of uppercase and lowercase table names and the code incorrectly uses the table names in wrong case. This causes the application to fail as the necessarily table cannot be found in Linux MySQL database. 

<div class="code">
MySQL table names are case-sensitive depending on the filesystem of the server. Since Windows and Mac are a case-insensitive OS, and Linux is case-sensitive; the MySQL database treats the uppercase table name differently than lowercase table name on Linux machines.

</div>

Solution:
1. Edit the MySQL configuration file (i.e. /etc/my.cnf), and add the following line in [mysqld] heading.

<div class="code">
lower_case_table_names=1

</div>

Note: By running the 'mysqld' with lower_case_table_names=1, the database creates the tables in all lower-case names. The existing table names are unaffected.

2. Restart the database so that all database table names are now created in lower-case.

3. Verify that the change we made above did take effect in the database. On Linux shell, run the following command and verify the value of 'lower_case_table_names'.

<div class="code">
# mysqladmin -u root -p variables

</div>

Note: <font color="red">All database table name comparison are now done in LOWER CASE. When the table name is given to mysql, it is converted to the LOWER CASE and the comparison is made; making it CASE INSENSITIVE comparison. </font>

4. <b>(Important*) You will have to drop the database, and re-import it into the MySQL database running in Linux. </b>

Note: Openbravo POS also uses mixture of uppercase and lowercase names in table column names. The mixed-case column names are treated indifferently on both environment, so there is no worries for mixed-case column names.]]></description>
<dc:creator>Aladar</dc:creator>
<dc:date>Sun, 22 Aug 2010 14:33:32 -0500</dc:date>
</item>
<item>
<title>How do you reset MySQL sequence number?</title>
<link>http://www.topwebhosts.org/bbs/board.php?bo_table=database&amp;wr_id=25</link>
<description><![CDATA[MySQL doesn't really support sequence numbers, but it does have an auto increment value which may be applied to a primary key of a table. A column with an auto increment "Extra Attribute" set automatically increments the value by 1 from the last number. To reset or modify auto increment value, you may use the following ALTER command.

<div class="code">
mysql> alter table {table_name} auto_increment = 1;
</div>]]></description>
<dc:creator>Aladar</dc:creator>
<dc:date>Thu, 21 May 2009 16:42:43 -0500</dc:date>
</item>
<item>
<title>mysqldump: Can't get CREATE TABLE for table</title>
<link>http://www.topwebhosts.org/bbs/board.php?bo_table=database&amp;wr_id=20</link>
<description><![CDATA[I'm trying to make a backup of entire database, but error occurs.

<div class="code">
[root@db root]# mysqldump --all-databases >db.sql
mysqldump: Can't get CREATE TABLE for table `nuke_stats_date` (Can't open file: 'nuke_stats_date.MYD'. (errno: 144))
</div>

I remember we had trouble with MySQL database when the disk filled to 100%, which we killed MySQL process manually. Since this happened, some of the database tables were corrupted and we were able to fix them using the 'repair' command. However, I cannot repair the above table. Any help will be greatly appreciated.]]></description>
<dc:creator>aladar</dc:creator>
<dc:date>Sat, 28 Jul 2007 22:23:37 -0500</dc:date>
</item>
<item>
<title>MySQL Replication: replicating specific databases only</title>
<link>http://www.topwebhosts.org/bbs/board.php?bo_table=database&amp;wr_id=19</link>
<description><![CDATA[The master and slave database servers do not need to be in sync entirely, with all databases and all tables from the master replicated onto the slave. By default, the slave will replicate everything, but this behavior can be changed with change in configuration options:

<div class="code">
// replicate this database
replicate-do-db=database_name 

// don't replicate this database
replicate-ignore-db=database_name 

// replicate this database.table
replicate-do-table=database_name.table_name 

// don't replicate this table
replicate-ignore-table=database_name.table_name 

// allows wildcards, use % as the wildcard character
// e.g db% would be all databases beginning with db
replicate--wild-do-table=database_name.table_name 

// ignore all specified tables, with wildcards
replicate-wild-ignore-table=db_name.table_name
</div>

These options can all be used multiple times in a single configuration. A couple of other useful options:

<div class="code">
// allows you to use map databases that use different 
// database names on each server
replicate-rewrite-db=master_db->slave_database

//  writes replicated statements to the slaves binary logs
log-slave-update
</div>]]></description>
<dc:creator>admin</dc:creator>
<dc:date>Thu, 05 Jul 2007 23:53:12 -0500</dc:date>
</item>
<item>
<title>MySQL DB Replication: Slave having problem starting Slave I/O thread.</title>
<link>http://www.topwebhosts.org/bbs/board.php?bo_table=database&amp;wr_id=17</link>
<description><![CDATA[I&#039;ve setup MySQL db replication, and started both master and slave but synchronization does not work. Looking at the /var/log/mysqld.log on the slave machine shows the following error messages:<br/><br/>070703 11:55:25 [ERROR] Slave I/O thread exiting, read up to log &#039;mysql-bin&#039;, po<br/>sition 79<br/>070703 11:57:45 [ERROR] Error reading relay log event: slave SQL thread was kill<br/>ed<br/>070703 11:59:45 [Note] Slave SQL thread initialized, starting replication in log<br/>&nbsp;&#039;mysql-bin.000001&#039; at position 4190, relay log &#039;./web2-relay-bin.000001&#039; positi<br/>on: 4<br/>070703 11:59:46 [Note] Slave I/O thread: connected to master &#039;<a href='mailto:slave@74.205.60.14'>slave@74.205.60.14</a><br/>6:3306&#039;,&nbsp; replication started in log &#039;mysql-bin.000001&#039; at position 4190<br/><br/>The "show slave status" command shows the following values:<br/>Slave_IO_State: [none]<br/>Slave_IO_Running: No<br/>Slave_SQL_Running: yes<br/><br/>Any insight into fixing this problem?&nbsp; Thanks.]]></description>
<dc:creator>aladar</dc:creator>
<dc:date>Tue, 03 Jul 2007 12:21:37 -0500</dc:date>
</item>
<item>
<title>How to run MySQL Commands from a Text File?</title>
<link>http://www.topwebhosts.org/bbs/board.php?bo_table=database&amp;wr_id=14</link>
<description><![CDATA[How do you run a SQL command from a text file on MySQL database?]]></description>
<dc:creator>aladar</dc:creator>
<dc:date>Thu, 05 Apr 2007 17:11:18 -0500</dc:date>
</item>
<item>
<title>How do you rename mysql table name?</title>
<link>http://www.topwebhosts.org/bbs/board.php?bo_table=database&amp;wr_id=12</link>
<description><![CDATA[Is there a way to rename mysql table name? Thanks.]]></description>
<dc:creator>ryan</dc:creator>
<dc:date>Sat, 10 Mar 2007 12:01:52 -0600</dc:date>
</item>
<item>
<title>How to query REDO log file information from sqlplus?</title>
<link>http://www.topwebhosts.org/bbs/board.php?bo_table=database&amp;wr_id=11</link>
<description><![CDATA[To query the redo logs groups and members information including the status of the redo log file, perform the following SQL command:<br/><br/>SQL&gt; select group#, sequence#, bytes, members, status from v$log;<br/><br/>&nbsp; &nbsp; GROUP#&nbsp; SEQUENCE#&nbsp; &nbsp; &nbsp; BYTES&nbsp; &nbsp; MEMBERS STATUS<br/>---------- ---------- ---------- ---------- ----------------<br/>&nbsp; &nbsp; &nbsp; &nbsp;  1&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 1&nbsp; 104857600&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 1 CURRENT<br/>&nbsp; &nbsp; &nbsp; &nbsp;  2&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 2&nbsp; 104857600&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 1 INACTIVE<br/>&nbsp; &nbsp; &nbsp; &nbsp;  3&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 3&nbsp; 104857600&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 1 INACTIVE<br/>&nbsp; &nbsp; &nbsp; &nbsp;  4&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 4&nbsp; 104857600&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 1 UNUSED<br/><br/>4 rows selected.<br/><br/>To query the location of redo log file member files, perform the following:<br/><br/>SQL&gt; select type, member from V$LOGFILE;<br/><br/>TYPE&nbsp; &nbsp; &nbsp; &nbsp; MEMBER<br/>---------------------------------------------------------------------------------------<br/>ONLINE&nbsp; &nbsp; /redos/redo01_01.log<br/>ONLINE&nbsp; &nbsp; /redos/redo02_01.log<br/>ONLINE&nbsp; &nbsp; /redos/redo03_01.log<br/>STANDBY&nbsp; /redos/stb_redo04_01.log<br/><br/>4 rows selected.<br/><br/>To query standby log file information, perform the following:<br/><br/>SQL&gt; select group#, archived, status from v$standby_log;<br/><br/>&nbsp; &nbsp; GROUP# ARC STATUS<br/>---------- --- ----------<br/>&nbsp; &nbsp; &nbsp; &nbsp;  9 YES UNASSIGNED<br/>&nbsp; &nbsp; &nbsp; &nbsp; 10 YES UNASSIGNED<br/>&nbsp; &nbsp; &nbsp; &nbsp; 11 YES UNASSIGNED<br/>&nbsp; &nbsp; &nbsp; &nbsp; 12 YES UNASSIGNED<br/>&nbsp; &nbsp; &nbsp; &nbsp; 13 YES UNASSIGNED<br/><br/>5 rows selected.]]></description>
<dc:creator>admin</dc:creator>
<dc:date>Wed, 07 Mar 2007 23:42:15 -0600</dc:date>
</item>
<item>
<title>MySQL Error 1016: Can't open file: 'user_tracking.MYD'. (errno: 145)</title>
<link>http://www.topwebhosts.org/bbs/board.php?bo_table=database&amp;wr_id=9</link>
<description><![CDATA[We&#039;ve been running osCommerce website flawlessly for over two years, but recently encountered the following MySQL error.<br/><br/>1016: Can&#039;t open file: &#039;user_tracking.MYD&#039;. (errno: 145)<br/><br/>We&#039;re running mysql 3.23.58 version, and recently restarted the mysqld by killing the mysql processes. This may have corrupted the table file named above. Any clue how to repair this?]]></description>
<dc:creator>aladar</dc:creator>
<dc:date>Wed, 07 Mar 2007 23:40:37 -0600</dc:date>
</item>
<item>
<title>After mysql upgrade, I'm having trouble with mysql passwords</title>
<link>http://www.topwebhosts.org/bbs/board.php?bo_table=database&amp;wr_id=8</link>
<description><![CDATA[Q. After MySQL upgrade from 3.5.x to 4.1.x, the mysql passwords do not work anymore. Is there a quick fix for this?<br/><br/>A. The MySQL 4.1.x (or above) may have to respond to auth requests from "old" clients, such as a prebuilt PHP binary or any application that may use built-in mysql libs. To make 4.1.x (or above version) work with the applications used in older versions (i.e. 3.5.x), you&#039;ll have to make old-password compatible with the new with command-line option.<br/><br/>Option 1.<br/>For MySQL 4.1 or later, the my.cnf file may be used to specify configuration options. In addition to specifying the basedir and datadir values, you may also set the old-passwords option, which will instruct MySQL to use PHP-compatible passwords: <br/>[mysqld]<br/>basedir = ...<br/>datadir = ...<br/>old-passwords=1<br/>max-connections=150<br/>default-character-set=latin1<br/>default-collation=latin1_bin<br/><br/><br/>Option 2.<br/>Start mysqd with --old-passwords option<br/># mysqld --old-passwords<br/><br/>To see wheter MySQL is using old or new passwords, perform the following on the MySQL client:<br/><br/>mysql&gt; SELECT Host, User, Password FROM mysql.user<br/>-&gt; WHERE LENGTH(Password) &gt; 16;<br/><br/>If it returns the rows, it is using the new passwords.]]></description>
<dc:creator>aladar</dc:creator>
<dc:date>Mon, 04 Dec 2006 21:58:36 -0600</dc:date>
</item>
<item>
<title>MySQL, Character Set and collation</title>
<link>http://www.topwebhosts.org/bbs/board.php?bo_table=database&amp;wr_id=6</link>
<description><![CDATA[MySQL documentation states the following in respect to "character set" and "collation".<br/><br/>A character set is a set of symbols and encodings. A collation is a set of rules for comparing characters in a character set. Let&#039;s make the distinction clear with an example of an imaginary character set.<br/><br/>Suppose that we have an alphabet with four letters: &#039;A&#039;, &#039;B&#039;, &#039;a&#039;, &#039;b&#039;. We give each letter a number: &#039;A&#039; = 0, &#039;B&#039; = 1, &#039;a&#039; = 2, &#039;b&#039; = 3. The letter &#039;A&#039; is a symbol, the number 0 is the encoding for &#039;A&#039;, and the combination of all four letters and their encodings is a character set.<br/><br/>Suppose that we want to compare two string values, &#039;A&#039; and &#039;B&#039;. The simplest way to do this is to look at the encodings: 0 for &#039;A&#039; and 1 for &#039;B&#039;. Because 0 is less than 1, we say &#039;A&#039; is less than &#039;B&#039;. What we&#039;ve just done is apply a collation to our character set. The collation is a set of rules (only one rule in this case): compare the encodings. We call this simplest of all possible collations a binary collation. <br/><br/>But what if we want to say that the lowercase and uppercase letters are equivalent? Then we would have at least two rules: (1) treat the lowercase letters &#039;a&#039; and &#039;b&#039; as equivalent to &#039;A&#039; and &#039;B&#039;; (2) then compare the encodings. We call this a case-insensitive collation. It&#039;s a little more complex than a binary collation. <br/><br/>-- End of MySQL documentation citation<br/><br/>Starting with MySQL version 4.1, there are five levels to which character sets and collations can be applied - server, database, table, column and string constant. The rules for applying character set and collation occurs according to precedence. The order of precedence is string constant, column, table, database and server. The character set and collation specific to a particular string constant and column apply first. If those don&#039;t exist, the table default is used, and if that doesn&#039;t exist the database default, and finally the server default. By default, MySQL uses the latin1 character set, and the latin1_swedish_ci collation. You can see which defaults apply to your installation by running the folloing statements:<br/><br/>mysql&gt; SHOW VARIABLES LIKE &#039;character_set%&#039;;<br/>+--------------------------+----------------------------+<br/>| Variable_name&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | Value&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |<br/>+--------------------------+----------------------------+<br/>| character_set_client&nbsp; &nbsp;  | latin1&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  |<br/>| character_set_connection | latin1&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  |<br/>| character_set_database&nbsp;  | latin1&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  |<br/>| character_set_results&nbsp; &nbsp; | latin1&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  |<br/>| character_set_server&nbsp; &nbsp;  | latin1&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  |<br/>| character_set_system&nbsp; &nbsp;  | utf8&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  |<br/>| character_sets_dir&nbsp; &nbsp; &nbsp;  | /usr/share/mysql/charsets/ |<br/>+--------------------------+----------------------------+<br/>7 rows in set (0.00 sec)<br/><br/>The server defaults are set up in the configuration file (/etc/my.cnf). For example: <br/><br/>[mysqld]<br/>...<br/>default-character-set=euckr<br/>default-collation=euckr_korean_ci<br/>...<br/><br/>To create a table or a database that makes use of a different character set and collation, simply use the CHARACTER SET (CHARSET is a synonym) and COLLATION clauses.<br/><br/><br/>mysql&gt; CREATE TABLE tablename(column definitions, ...) CHARACTER SET euckr COLLATE euckr_korean_ci;<br/>Query OK, 0 rows affected (0.12 sec)<br/><br/>mysql&gt; CREATE DATABASE dbname CHARACTER SET euckr COLLATE euckr_korean_ci;<br/>Query OK, 1 row affected (0.05 sec)<br/><br/>-- If you already have a database that you need to change character set, use alter database command.<br/>mysql&gt; ALTER DATABASE dbname CHARACTER SET euckr COLLATE euckr_korean_ci;<br/><br/><br/>Client, Results and Connection CHARACTER SET and COLLATION<br/>Setting the correct character set on the server is only a half story. In order to display characters correctly on the client (be it a GUI or Web), it is important how the client gets the data from the server. To establish a client connection to the server with a desired character set, we need to define client connection settings with variables.<br/><br/>set character_set_client = euckr;<br/>set character_set_results = euckr;<br/>set character_set_connection = euckr;<br/><br/><br/>Since those three variables are likely changed at the same time, MySQL offers a command that will allow you to change all three with one command.<br/><br/><br/>set names = euckr;<br/>or<br/>set names euckr collate euckr_korean_ci;]]></description>
<dc:creator>aladar</dc:creator>
<dc:date>Mon, 04 Dec 2006 20:29:37 -0600</dc:date>
</item>
<item>
<title>MySQL spits "Too many connections" error</title>
<link>http://www.topwebhosts.org/bbs/board.php?bo_table=database&amp;wr_id=5</link>
<description><![CDATA[If you have too many connections on the MySQL database, you may reach a limit  and no new connections can be created. The default connection limit is 100, and you may use max_connections system variable to increase the size. To see the current max_connections size, connect to the mysql and type the following commane

mysql> show variables like 'max_connections';
<pre>
+-----------------+-------+
| Variable_name   | Value |
+-----------------+-------+
| max_connections | 100   |
+-----------------+-------+
1 row in set (0.00 sec)
</pre>

mysqld actually allows max_connections+1 clients to connect. The extra connection is reserved for use by accounts that have the SUPER privilege. By granting the SUPER privilege to administrators and not to normal users (who should not need it), an administrator can connect to the server and use SHOW PROCESSLIST to diagnose problems even if the maximum number of unprivileged clients are connected.

To diagnose this problem, type the following from the MySQL client session:

mysql> show processlist;

You will see all the connections that exists. Each connection is associated with an ID, and you'll use that ID to disconnect (or kill) the connections.

mysql> kill 3004512;

To increase the max_connections and max_user_connections, please edit the /etc/my.cnf file and add the following statements.

[mysqld]
max_connections=300

It is always helpful to check your code and make sure all mysql connections are being closed properly, and  change from mysql_pconnect to mysql_connect.  The pconnect may not give you much speed advantage if connecting to a local mysql server.]]></description>
<dc:creator>aladar</dc:creator>
<dc:date>Wed, 15 Nov 2006 16:50:05 -0600</dc:date>
</item>
</channel>
</rss>
