Character Sets in 3.23.58
Hello, We are running mySQL 3.23.58 on a RedHat server. We have a database that needs to store Chinese (big5) and Vietnamese (Unicode-8 should work)how do I get it to store alternative character sets? The docs online only relate to ver 4so the character set attribute doesn't work. Any help would be appreciatedI'm new to this multiple language thing. Thanks! -Andy -- -- Andrew Mull Tower Communications, LLC 102 Carmen Drive Blandon, PA 19510 Work: 610-926-9734 Cell: 484-794-9433 [EMAIL PROTECTED] www.tower-communications.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Copying table to another server.
Hello, I'm having a problem with moving a database from one server to another using mysqldump. Since the servers are different platforms, some ascii characters are getting corrupted. So, my thought was to copy the table from one database to the other via the mysql interface. I found this online at mysql: mysqladmin -h 'other_hostname' create db_name mysqldump --opt db_name | mysql -h 'other_hostname' db_name However, all it does is hang...so I'm guessing its a permission problem? Any suggestion to how to setup this up so it works or is there an easier way? Thanks! -Andy -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Embedded Quotes and Special Characters.
I'm moving a database from one server to another. Both are unix based, however the original database is on a Solaris box, and the new server is RedHat. The database has embedded s and 's in some of the varchar fields. When I moved the database, I did a mysqldump, copied the text file to the new server, and imported the data. The database on the new server is now showing odd characters in place of the original s and 's. Is there a way to fix this problem? Thanks! -Andy -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Embedded Quotes and Special Characters.
That is what I was wondering, but not sure how to check/set the proper character set. Thanks. -Andy Quoting Gleb Paharenko [EMAIL PROTECTED]: Hello. You can write a script which will walk through all tables and update the rows using replace() function. But, I think, you should find the source of the problem. What odd characters have appeared after importing? If they are just unreadable, may be the clue is in wrong character set. Andrew Mull [EMAIL PROTECTED] wrote: I'm moving a database from one server to another. Both are unix based, however the original database is on a Solaris box, and the new server is RedHat. The database has embedded s and 's in some of the varchar fields. When I moved the database, I did a mysqldump, copied the text file to the new server, and imported the data. The database on the new server is now showing odd characters in place of the original s and 's. Is there a way to fix this problem? Thanks! -Andy -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is sponsored by Ensita.NET http://www.ensita.net/ __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Gleb Paharenko / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.NET ___/ www.mysql.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Embedded Quotes and Special Characters.
When I look at the dump file, I see that one of the invalid characters is represented as /226 I'll have to look to see if it is consistent, and just replace it. Thanks. Quoting [EMAIL PROTECTED]: are you sure that the single/double quotes in your original data were actually the standard ascii characters (decimal 39 (') and 34 ()) -- not smart quotes? you shouldn't have any trouble with the standard quote characters, but as the representation of smart quotes isn't standard you will. -- Original Message -- From: Andrew Mull [EMAIL PROTECTED] To: mysql@lists.mysql.com Date: Tuesday, January 04, 2005 10:19:20 AM -0500 Subject: Embedded Quotes and Special Characters. I'm moving a database from one server to another. Both are unix based, however the original database is on a Solaris box, and the new server is RedHat. The database has embedded s and 's in some of the varchar fields. When I moved the database, I did a mysqldump, copied the text file to the new server, and imported the data. The database on the new server is now showing odd characters in place of the original s and 's. Is there a way to fix this problem? Thanks! -Andy -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] -- End Original Message -- -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Embedded Quotes and Special Characters.
On other instances, are escaped as \...I would think that should translate correctly? Thanks Quoting Andrew Mull [EMAIL PROTECTED]: When I look at the dump file, I see that one of the invalid characters is represented as /226 I'll have to look to see if it is consistent, and just replace it. Thanks. Quoting [EMAIL PROTECTED]: are you sure that the single/double quotes in your original data were actually the standard ascii characters (decimal 39 (') and 34 ()) -- not smart quotes? you shouldn't have any trouble with the standard quote characters, but as the representation of smart quotes isn't standard you will. -- Original Message -- From: Andrew Mull [EMAIL PROTECTED] To: mysql@lists.mysql.com Date: Tuesday, January 04, 2005 10:19:20 AM -0500 Subject: Embedded Quotes and Special Characters. I'm moving a database from one server to another. Both are unix based, however the original database is on a Solaris box, and the new server is RedHat. The database has embedded s and 's in some of the varchar fields. When I moved the database, I did a mysqldump, copied the text file to the new server, and imported the data. The database on the new server is now showing odd characters in place of the original s and 's. Is there a way to fix this problem? Thanks! -Andy -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] -- End Original Message -- -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Unique IDs
You are correct in that I need to merge two tables. However, I'm not clear on how to update the FKs in the sub tables. Example, the main table (Person) has a sub table (Address). Person has a 1:N relationship with Address. So Address has the Person's ID as a FK. How do I update the FK in Address with the new ID assigned to Person that was created with the merge? Thanks for the help! Quoting Philippe Poelvoorde [EMAIL PROTECTED]: Andrew Mull wrote: I'm working on a rather large database with many cross-linked tables currently using auto increment IDs. The system is primarily a web based system, however, there will be times that the system will be run as a stand alone server...meaning no internet connection is available. The question arises that if someone enters information to the database on the website, while others are entering information on the local database, what is the best way to merge the data? I would imagine that we would run into many duplicate auto increment IDs. I'm sure that for one table insert, this would not be a problem as I could store the SQL statement in a text file without the ID specified, and run it as a batch process on the live server when we get connectivity. But I don't have a handle on how to update the sub tables that have a FK pointer. Any ideas? Thanks! -Andy I understand your question as the following: you want to merge 2 tables comming from different database in a single table. If this is not what you want, sorry :) I would do that : LOCK TABLE table1 WRITE, table2 WRITE select @max_id:=max(id) FROM table1; UPDATE table2 SET [EMAIL PROTECTED]; insert into table1(list of columns) select [list of columns] from table2 UNLOCK and then updating your FK within the update query. Keep in mind that I didn't try with InnoDb tables... (but works fine for MyIsam) -- Philippe Poelvoorde COS Trading Ltd. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Unique IDs
Thank you. I'll have to review the SQL carefully as I haven't used inner joins in quite some time :) Quoting [EMAIL PROTECTED]: Create a temporary table that will act as a map between your old IDs and your new ones. That way you can re-use those values and change them from the old values to the new values. LOCK TABLE table1 WRITE, table2 WRITE, table3 WRITE; select @max_id:=max(id) FROM table1; CREATE TEMPORARY TABLE tmpIDMAP SELECT id, [EMAIL PROTECTED] as newID FROM table2 INSERT into table1(id, list of other columns) select m.newID, list of other columns from table2 INNER JOIN tmpIDMAP m ON m.id = table2.id UPDATE table3 INNER JOIN tmpIDMAP m ON m.id = table3.parentID SET table3.parentID = m.newID (repeat for other child tables) UNLOCK I don't have time to give a better explanation right now but if you write the list back, I can fill in the details later. Shawn Green Database Administrator Unimin Corporation - Spruce Pine Andrew Mull [EMAIL PROTECTED] wrote on 12/21/2004 12:20:57 PM: You are correct in that I need to merge two tables. However, I'm not clear on how to update the FKs in the sub tables. Example, the main table (Person) has a sub table (Address). Person has a 1:N relationship with Address. So Address has the Person's ID as a FK. How do I update the FK in Address with the new ID assigned to Person that was created with the merge? Thanks for the help! Quoting Philippe Poelvoorde [EMAIL PROTECTED]: Andrew Mull wrote: I'm working on a rather large database with many cross-linked tables currently using auto increment IDs. The system is primarily a web based system, however, there will be times that the system will be run as a stand alone server...meaning no internet connection is available. The question arises that if someone enters information to the database on the website, while others are entering information on the local database, what is the best way to merge the data? I would imagine that we would run into many duplicate auto increment IDs. I'm sure that for one table insert, this would not be a problem as I could store the SQL statement in a text file without the ID specified, and run it as a batch process on the live server when we get connectivity. But I don't have a handle on how to update the sub tables that have a FK pointer. Any ideas? Thanks! -Andy I understand your question as the following: you want to merge 2 tables comming from different database in a single table. If this is not what you want, sorry :) I would do that : LOCK TABLE table1 WRITE, table2 WRITE select @max_id:=max(id) FROM table1; UPDATE table2 SET [EMAIL PROTECTED]; insert into table1(list of columns) select [list of columns] from table2 UNLOCK and then updating your FK within the update query. Keep in mind that I didn't try with InnoDb tables... (but works fine for MyIsam) -- Philippe Poelvoorde COS Trading Ltd. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Unique IDs
I'm working on a rather large database with many cross-linked tables currently using auto increment IDs. The system is primarily a web based system, however, there will be times that the system will be run as a stand alone server...meaning no internet connection is available. The question arises that if someone enters information to the database on the website, while others are entering information on the local database, what is the best way to merge the data? I would imagine that we would run into many duplicate auto increment IDs. I'm sure that for one table insert, this would not be a problem as I could store the SQL statement in a text file without the ID specified, and run it as a batch process on the live server when we get connectivity. But I don't have a handle on how to update the sub tables that have a FK pointer. Any ideas? Thanks! -Andy -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]