connect with myODBC to mysql through proxy
Hi all, I have a windows computer in my network which needs an odbc connection through proxy. the only thing is that i don't know how to do this on a windows machine. i have installed the myodbc driver and it works for connecting on a mysql server in my local network. but i have an isp address, the database name. connecting without proxy, that is directly, works fine; but i need to make a connection behind a proxy. Danny -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: LIKE problem?
select count(*) from user where username like 'a%'; select count(*) from user where username not like 'a%' or username is null; is not the same for all letters of the alphabet: letter like not-like sum n 2304 59317 61621 o 0 60797 60797 p 3048 58573 61621 Sounds like a corrupt index. Try CHECK TABLE and REPAIR TABLE. Tried that, tried myisamchk as well, everything seems to be healthy, still the problem exists. Zoltan -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Best Fieldtype to store IP address...
Jasper Bryant-Greene: Rhino wrote: Isn't there a new way to express IP addresses called IPV6(?) which has a possibility of 6 distinct parts instead of the traditional 4? I haven't seen one of these new formats myself yet but for all I know, they will become soon in the near future. Maybe you'd better choose a field type that can accomodate those as well as the traditional 123.123.123.123 type It's not a new way to express IP addresses. It's a new version of IP, the Internet Protocol, and theoretically if the OP follows the good advice already given and stores the IP address in an unsigned integer field, he should be fine (assuming, probably safely, that INET_{ATON,NTOA}6() functions are made); although he may need a bigger integer type for IPv6 addresses. An IPv6 address is 128 bits. That's twice as big as a MySQL bigint, so you can't store it as an integer. Use binary(16). Besides, you don't want to mix IPv4 addresses and IPv6 addresses in the same column unless you have another column that keeps track of which kind of address it is, but I seem to recall that there is a standard mapping from IPv4 addresses to IPv6 addresses, so you could use that and store them all as IPv6 addresses. Björn Persson -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Unable to access mysql database with root user after upgrade?
Murray @ PlanetThoughtful [EMAIL PROTECTED] wrote on 11/11/2005 08:44:37 PM: Hi All, I recently upgraded from MySQL 4.1.14 to 5.0.15 on my WinXP machine. For some reason my root login can't access the mysql database anymore, though I can use it to access the databases I have defined. In effect, it seems as though I have no real root (or administrator level, if that's a better way of putting it) login anymore... Does anyone know how I go about granting administrator privileges to root for the mysql database? Any help appreciated! Much warmth, Murray @ PlanetThoughtful Are you talking about root the OS user or root the MySQL user account? One or more of the following sections may apply to your situation: http://dev.mysql.com/doc/refman/4.1/en/common-errors.html MySQL may have a user called root or not. It all depends on how it has been setup. http://dev.mysql.com/doc/refman/4.1/en/privilege-system.html Shawn Green Database Administrator Unimin Corporation - Spruce Pine
Re: Unable to access mysql database with root user after upgrade?
[EMAIL PROTECTED] wrote: Murray @ PlanetThoughtful [EMAIL PROTECTED] wrote on 11/11/2005 08:44:37 PM: Hi All, I recently upgraded from MySQL 4.1.14 to 5.0.15 on my WinXP machine. For some reason my root login can't access the mysql database anymore, though I can use it to access the databases I have defined. In effect, it seems as though I have no real root (or administrator level, if that's a better way of putting it) login anymore... Does anyone know how I go about granting administrator privileges to root for the mysql database? Any help appreciated! Much warmth, Murray @ PlanetThoughtful Are you talking about root the OS user or root the MySQL user account? One or more of the following sections may apply to your situation: http://dev.mysql.com/doc/refman/4.1/en/common-errors.html MySQL may have a user called root or not. It all depends on how it has been setup. http://dev.mysql.com/doc/refman/4.1/en/privilege-system.html Shawn Green Database Administrator Unimin Corporation - Spruce Pine Hi Shawn, Sorry, I'm talking about root the MySQL user account. The account exists -- I can perform the following, for example: c:mysql --user=root ptnew -p Once I supply the password, this will put me in to the ptnew database, which is one that I created for one of my local development web sites. However, I can't do: c:mysql --user=root mysql -p Once I supply the password, I get an access denied error. Similarly for when I attempt to get into the test database. (It probably goes without saying, but I get the same access denies error when issuing use mysql; or use test;) It seems my privileges got messed up during the upgrade from 4.1.7 to 5.0.15, and now I don't appear to have any real administrator login, in that I can't create new users, or modify privileges etc. I'll check the links out that you supplied, but if you have any other thoughts, I'd love to hear them. Thanks and much warmth, Murray @ PlanetThoughtful -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: MySQL insert performance
Please, sorry for a delayed reply. In my previous mail I've asked you include the output of 'show variables' statement, so please do it in your next message. I'd like (and probably others on the list) to see your settings. Also, perform the 'show status' just after the import; before the import restart your server, otherwise it could not contain usable information. Dhiren Bhatia [EMAIL PROTECTED] wrote: This is on a development box, 1.5 GB RAM, 1CPU (1.6GHz) with the app server database server running on the same box. I'm using the Tomcat Database Connection Pool to get a JDBC connection and insert the data. I dont have too much free disk space on this machine (approx 2GB). At the time of the insert, the CPU usage was minimal. I have not set up any indexes on the table. The data is very simple, just 4 columns. 3 Integers and 1 Varchar(45). mysql show status; +--+---+ | Variable_name | Value | +--+---+ | Aborted_clients | 0 | | Aborted_connects | 0 | | Binlog_cache_disk_use | 0 | | Binlog_cache_use | 0 | | Bytes_received | 78 | | Bytes_sent | 70 | | Com_admin_commands | 0 | | Com_alter_db | 0 | | Com_alter_table | 0 | | Com_analyze | 0 | | Com_backup_table | 0 | | Com_begin | 0 | | Com_change_db | 0 | | Com_change_master | 0 | | Com_check | 0 | | Com_checksum | 0 | | Com_commit | 0 | | Com_create_db | 0 | | Com_create_function | 0 | | Com_create_index | 0 | | Com_create_table | 0 | | Com_dealloc_sql | 0 | | Com_delete | 0 | | Com_delete_multi | 0 | | Com_do | 0 | | Com_drop_db | 0 | | Com_drop_function | 0 | | Com_drop_index | 0 | | Com_drop_table | 0 | | Com_drop_user | 0 | | Com_execute_sql | 0 | | Com_flush | 0 | | Com_grant | 0 | | Com_ha_close | 0 | | Com_ha_open | 0 | | Com_ha_read | 0 | | Com_help | 0 | | Com_insert | 0 | | Com_insert_select | 0 | | Com_kill | 0 | | Com_load | 0 | | Com_load_master_data | 0 | | Com_load_master_table | 0 | | Com_lock_tables | 0 | | Com_optimize | 0 | | Com_preload_keys | 0 | | Com_prepare_sql | 0 | | Com_purge | 0 | | Com_purge_before_date | 0 | | Com_rename_table | 0 | | Com_repair | 0 | | Com_replace | 0 | | Com_replace_select | 0 | | Com_reset | 0 | | Com_restore_table | 0 | | Com_revoke | 0 | | Com_revoke_all | 0 | | Com_rollback | 0 | | Com_savepoint | 0 | | Com_select | 0 | | Com_set_option | 0 | | Com_show_binlog_events | 0 | | Com_show_binlogs | 0 | | Com_show_charsets | 0 | | Com_show_collations | 0 | | Com_show_column_types | 0 | | Com_show_create_db | 0 | | Com_show_create_table | 0 | | Com_show_databases | 0 | | Com_show_errors | 0 | | Com_show_fields | 0 | | Com_show_grants | 0 | | Com_show_innodb_status | 0 | | Com_show_keys | 0 | | Com_show_logs | 0 | | Com_show_master_status | 0 | | Com_show_new_master | 0 | | Com_show_open_tables | 0 | | Com_show_privileges | 0 | | Com_show_processlist | 0 | | Com_show_slave_hosts | 0 | | Com_show_slave_status | 0 | | Com_show_status | 1 | | Com_show_storage_engines | 0 | | Com_show_tables | 0 | | Com_show_variables | 0 | | Com_show_warnings | 0 | | Com_slave_start | 0 | | Com_slave_stop | 0 | | Com_truncate | 0 | | Com_unlock_tables | 0 | | Com_update | 0 | | Com_update_multi | 0 | | Connections | 2 | | Created_tmp_disk_tables | 0 | | Created_tmp_files | 3 | | Created_tmp_tables | 0 | | Delayed_errors | 0 | | Delayed_insert_threads | 0 | | Delayed_writes | 0 | | Flush_commands | 1 | | Handler_commit | 0 | | Handler_delete | 0 | | Handler_discover | 0 | | Handler_read_first | 2 | | Handler_read_key | 0 | | Handler_read_next | 0 | | Handler_read_prev | 0 | | Handler_read_rnd | 0 | | Handler_read_rnd_next | 20 | | Handler_rollback | 0 | | Handler_update | 0 | | Handler_write | 0 | | Key_blocks_not_flushed | 0 | | Key_blocks_unused | 7173 | | Key_blocks_used | 0 | | Key_read_requests | 0 | | Key_reads | 0 | | Key_write_requests | 0 | | Key_writes | 0 | | Max_used_connections | 1 | | Not_flushed_delayed_rows | 0 | | Open_files | 0 | | Open_streams | 0 | | Open_tables | 0 | | Opened_tables | 11 | | Qcache_free_blocks | 0 | | Qcache_free_memory | 0 | | Qcache_hits | 0 | | Qcache_inserts | 0 | | Qcache_lowmem_prunes | 0 | | Qcache_not_cached | 0 | | Qcache_queries_in_cache | 0 | | Qcache_total_blocks | 0 | | Questions | 1 | | Rpl_status | NULL | | Select_full_join | 0 | | Select_full_range_join | 0 | | Select_range | 0 | | Select_range_check | 0 | | Select_scan | 0 | | Slave_open_temp_tables | 0 | | Slave_running | OFF | | Slow_launch_threads | 0 | | Slow_queries | 0 | | Sort_merge_passes | 0 | | Sort_range | 0 | | Sort_rows | 0 | | Sort_scan | 0 | | Table_locks_immediate | 11 | | Table_locks_waited | 0 | | Threads_cached | 0 | | Threads_connected | 1 | | Threads_created | 1 | | Threads_running | 1 | | Uptime | 13 | +--+---+ 156 rows
Re: connect with myODBC to mysql through proxy
Hello. Please could you describe more in details what kind of proxy you want to use and the network topology (firewalls, routers which perform NAT and so on). Danny Stolle wrote: Hi all, I have a windows computer in my network which needs an odbc connection through proxy. the only thing is that i don't know how to do this on a windows machine. i have installed the myodbc driver and it works for connecting on a mysql server in my local network. but i have an isp address, the database name. connecting without proxy, that is directly, works fine; but i need to make a connection behind a proxy. Danny -- 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]
concurrency in mysql 4.0.25
I'm running mysql 4.0.25 on netbsd 3, on a dual-processor opteron machine with 16GB. I'm trying to make things faster, of course. All the data operations are on one very large table (about 20GB, index is 17GB), which I will eventually figure out how to split. I have four processes working on this table at once; they select 20,000 or more row, chew for a while, and then update those rows. I have a lot of trouble with the index blocks getting flushed when updates are done in parallel, so there is some judicious locking to help that. (The key_buffer_size is set to 4GB, which is the maximum supported - I'd use more if I could.) What I notice is that even though I have two client threads doing SELECT at the same time, I never manage to use more than one CPU, maybe dipping into the second one a small bit. The mysql config log indicates that it found pthreads and compiled with it. systat vmstat tells me that the disks are idle, memory is full, and top indicates that the mysqld process is CPU bound. There are many many syscalls being completed; I'm guessing that the blocks are moving from file buffer pages to the process. Is there a tool (or option to ps or top) that lets me view the thread activity inside a process? I see in the pthread(3) man page that there's an environment variable PTHREAD_CONCURRENCY The number of concurrent threads to be run. This value should at least be 1, and smaller than or equal to the number of CPUs. Do I need to set this to be more than 1 in the mysqld environment? Thanks, chris -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Problem with collation...
Hi guys: I know this question have been asked many times but I still get no solution. I have a database with thousands of rows which by mistake was imported in the wrong way and all the spanish characters went wrong. For example the letter 'á' appears like 'Ãf¡'. The problem is that I am trying to recover this database and have tried all the possible collations and no one results, and also cannot export this database again because I have dropped it, and have only the dump file. Does any body has any advice to correct this problem. Thanks in advance, Alvaro. - If you have an apple and I have an apple and we exchange these apples then you and I will still each have one apple. But if you have an idea and I have an idea and we exchange these ideas, then each of us will have two ideas --George Bernard Shaw--
Re: concurrency in mysql 4.0.25
I see in the pthread(3) man page that there's an environment variable PTHREAD_CONCURRENCY The number of concurrent threads to be run. This value should at least be 1, and smaller than or equal to the number of CPUs. Do I need to set this to be more than 1 in the mysqld environment? Apparently the answer to this is 'yes', based on a brief experiment I just did. Very nice. I'd still like some tool that lets me see the threads inside a process... chris -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
mysql_init(m) changes values of variables
Hello all, I found this odd thing when writing a client in C to connect to a mysql database server. I want to use mysql_real_query so I need the strlen() of the sqlStatement. So prior to calling mysql_init(m) I get the length of the sqlStatement. I check that length and it is correct after I first set it up the length is 23 which is correct. I then call mysql_init(m), then I check the length again, well the value of the int I set earlier, and it is 0. What's the deal? why would mysql_init() change the value of my int? Bruce Martin The Martin Solution PO Box 644 Delaware Water Gap, PA (570) 421-0670 [EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: 1266 creating innodb tables
Much thanks, that did the trick. Pierre Jasper Bryant-Greene [EMAIL PROTECTED] wrote: P. Evans wrote: skip-innodb is commented out,thats why its not in the options I sent previously. The logs are showing something peculiar - InnoDB: Error: log file ./ib_logfile0 is of different size 0 5242880 bytes InnoDB: than specified in the .cnf file 0 268435456 bytes! ls shows : drwxr-x--- 2 myznet myznet 2048 Oct 27 10:52 mysql -rw-rw 1 myznet myznet 5242880 Oct 31 00:32 ib_logfile1 -rw-rw 1 myznet myznet 20688404480 Oct 31 16:27 ibdata1 -rw-rw 1 myznet myznet 5242880 Oct 31 16:27 ib_logfile0 but in /etc/my.cnf, innodb_log_file_size = 256M What gives ? How can I get the logfiles in synch ? That's your problem. Back up and remove the old ib_logfile* files and restart MySQL to recreate them. Either you have changed the log file size in my.cnf or you've upgraded MySQL and the default has changed. Jasper - Yahoo! FareChase - Search multiple travel sites in one click.
Re: Problem with collation...
Alvaro Cobo: I have a database with thousands of rows which by mistake was imported in the wrong way and all the spanish characters went wrong. For example the letter 'á' appears like 'Ãf¡'. That looks like text that was in the UTF-8 encoding has been mistaken for an eight-bit encoding, transcoded from that eight-bit encoding to UTF-8, and then *again* mistaken for an eight-bit encoding. When your data is messed up that badly it will take some manual work to fix it. That is, you can't get MySQL to do it for you; you'll need some conversion tool to reverse the mangling. As a Fedora user I'd run it through Iconv. I don't know what tools are available for Windows. The problem is that I am trying to recover this database and have tried all the possible collations and no one results, and also cannot export this database again because I have dropped it, and have only the dump file. Assuming your example above was how the text looks when retrieved from MySQL, what does it look like in the dump file? Do non-English letters look like four garbage letters like above, or do they perhaps look like only two garbage letters? If you're lucky, the dump file isn't quite as messed up as the imported data. Björn Persson -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]