Re: backup
* Rick ([EMAIL PROTECTED]) wrote: i guys!! im newbie, how can i backup a mysql database? what do you recommend me? man mysqldump -- .''`. Carl B. Constantine : :' : [EMAIL PROTECTED] `. `'GnuPG: 135F FC30 7A02 B0EB 61DB 34E3 3AF1 DC6C 9F7A 3FF8 `- Debian GNU/Linux -- The power of freedom Claiming that your operating system is the best in the world because more people use it is like saying McDonalds makes the best food in the world. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: C API first row not being returned from a query
* Santino ([EMAIL PROTECTED]) wrote: I use : numRows = mysql_num_rows( Result); numFields = mysql_num_fields( Result); for( j=0; j numRows; j++) { mysql_data_seek( Result, j); CurrentRow = mysql_fetch_row( Result); for( k = 0; k numFields; k++) printf( %s\t, CurrentRow[ k]); printf( \n); } and it works Try to add mysql_data_seek( Result, 0); I'll remember the mysql_data_seek call. However, I did find my problem. It seems I was calling mysql_fetch_row( Result) once BEFORE returning to my calling routing to fetch the rows out, thus I was only getting the last 6 rows. DOH! Thanks for the help. -- .''`. Carl B. Constantine : :' : [EMAIL PROTECTED] `. `'GnuPG: 135F FC30 7A02 B0EB 61DB 34E3 3AF1 DC6C 9F7A 3FF8 `- Debian GNU/Linux -- The power of freedom Claiming that your operating system is the best in the world because more people use it is like saying McDonalds makes the best food in the world. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
C API first row not being returned from a query
I'm writing an application and have the following SQL Query written in C/GTK+ code: select customer_id, phone, last_name, first_name, company, account_code from customers; OK, I then issue the following C commands: results = mysql_store_result(conx); numRows = mysql_num_rows(results); g_print(There are %d rows returned\n, numRows); return(results); The print shows 7 rows returned, which is correct. I then have a while loop to step through each row like so: i = 0; while (db_row = mysql_fetch_row(results)) { g_print(getting data...\n); id = db_row[0]; phone = db_row[1]; last = db_row[2]; first = db_row[3]; company = db_row[4]; account = db_row[5]; row = g_strconcat(db_row[0],,,db_row[1],,,db_row[2],,,db_row[3],,,db_row[4], ,,db_row[5],0L); g_print(Row %d is: %s\n,i,row); i++; } OK, the problem is, I don't get the very first row, I only get the last 6 rows. Can anyone tell me WHY this is? It doesn't really make sense. This code supposedly prints rows 1-7 but really only prints 2-7. Your help is greatly appreciated. -- .''`. Carl B. Constantine : :' : [EMAIL PROTECTED] `. `'GnuPG: 135F FC30 7A02 B0EB 61DB 34E3 3AF1 DC6C 9F7A 3FF8 `- Debian GNU/Linux -- The power of freedom Claiming that your operating system is the best in the world because more people use it is like saying McDonalds makes the best food in the world. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
error 1044 on database restore
I'm trying to move a database from one machine to another. I dumped the database and successfully loaded it on one machine, but I can't do it on another machine. I have the database set up. I created the user to access the database, and gave all privs with grant option for that database. But when I go to run the command to restore the database, I get the following error: $ mysql -u user -p database database.sql Enter password: ERROR 1044 at line 26: Access denied for user: '[EMAIL PROTECTED]' to database 'database' I don't understand. Looking at the sql file, the line is: /*!4 ALTER TABLE accidents DISABLE KEYS */; LOCK TABLES accidents WRITE; UNLOCK TABLES; /*!4 ALTER TABLE accidents ENABLE KEYS */; Why can I do this on one machine but get an error on the other? The users are set up the same. Actually, using mysqlcc, I can't even get the user to have the lock tables priv, even though I'm root granting the priv, it just refuses to take. Yet, the machine it worked on seems to be set up the same way and I didn't have a problem. Can someone point me in the right direction to a solution? -- .''`. Carl B. Constantine : :' : [EMAIL PROTECTED] `. `'GnuPG: 135F FC30 7A02 B0EB 61DB 34E3 3AF1 DC6C 9F7A 3FF8 `- Debian GNU/Linux -- The power of freedom Claiming that your operating system is the best in the world because more people use it is like saying McDonalds makes the best food in the world. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: error 1044 on database restore
* Victoria Reznichenko ([EMAIL PROTECTED]) wrote: It means that user doesn't have ALTER privilege. BUT, I've tried granting the user all privs in mysqlcc and it still doesn't work. Looking at my other setup, the users look like they are set up the same. -- .''`. Carl B. Constantine : :' : [EMAIL PROTECTED] `. `'GnuPG: 135F FC30 7A02 B0EB 61DB 34E3 3AF1 DC6C 9F7A 3FF8 `- Debian GNU/Linux -- The power of freedom Claiming that your operating system is the best in the world because more people use it is like saying McDonalds makes the best food in the world. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Database replication
* Jeremy Zawodny ([EMAIL PROTECTED]) wrote: On Tue, Jun 24, 2003 at 09:14:18PM -0700, Carl B. Constantine wrote: I want to be able to take a database running on a primary server and duplicate/mirror it on a secondary server. I want to be able to update the secondary server on a selectable interval (every 15 mins, every hour, etc). What is the best way to accomplish this task? You'd need to start and stop replication on the slave using a bit of custom code. See the the replication related commands in the manual. Will do. thank you. Here is another question, is it possible for some people to work on the master and some on the slave, and then merge the data back and forth so that they are both the same or does it only work one way thus the DB's are out-of-sync? Additionally, where does MySQL write it's transactions? To a transaction log. :-) ha ha. I meant physically. If the power to the box dies and the system crashes, What does MySQL do to recover? What about tables that are not InnoDB? InnoDB tables scan the log for transactions that must be committed or rolled back. MyISAM tables are not transactional. Ok, That confirms what I thought. Thanks. -- .''`. Carl B. Constantine : :' : [EMAIL PROTECTED] `. `'GnuPG: 135F FC30 7A02 B0EB 61DB 34E3 3AF1 DC6C 9F7A 3FF8 `- Debian GNU/Linux -- The power of freedom -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Database replication
I want to be able to take a database running on a primary server and duplicate/mirror it on a secondary server. I want to be able to update the secondary server on a selectable interval (every 15 mins, every hour, etc). What is the best way to accomplish this task? Consider that at least one table is InnoDB and does use transactions. There may be others as I develop the database further. Additionally, where does MySQL write it's transactions? If the power to the box dies and the system crashes, What does MySQL do to recover? What about tables that are not InnoDB? Thanks. -- .''`. Carl B. Constantine : :' : [EMAIL PROTECTED] `. `'GnuPG: 135F FC30 7A02 B0EB 61DB 34E3 3AF1 DC6C 9F7A 3FF8 `- Debian GNU/Linux -- The power of freedom pgp0.pgp Description: PGP signature
segfault on startup after kernel change?
I recently changed my kernel (as noted in another message) to one that supports ACPI (for my laptop running RH9) and a couple other patches (I don't know all of them, one may have been the preemptive kernel patch). I've installed MySQL 4.0.12 from RPM's on the myslq.com site. When I start mysql using /etc/init.d/mysql start, I now get a 1024 segmentation fault: # /etc/init.d/mysql start # Starting mysqld daemon with databases from /var/lib/mysql /usr/bin/mysqld_safe: line 320: 1024 Segmentation fault $NOHUP_NICENESS $ledir/$MYSQLD $defaults --basedir=$MY_BASEDIR_VERSION --datadir=$DATADIR $USER_OPTION --pid-file=$pid_file --skip-locking $err_log 21 030618 08:00:57 mysqld ended I've checked the mysql log /var/lib/mysql/hostname.err but all it shows is this: 030618 08:00:57 mysqld started 030618 08:00:57 mysqld ended no realy information at all. If I switch back to the stock RH9 kernel, mysql starts just fine. So what in the kernel would cause this sudden segfault on startup? I don't get it. It shouldn't happen. Please answer. I've searched the mysql and mysql-bugs archives at AIMS and no answer. I did a google search on this error and come up with hits from many different lists (PHP, LDAP, and so forth) but nothing that pertains to what I'm seeing. Can someone provide some insight? -- .''`. Carl B. Constantine : :' : [EMAIL PROTECTED] `. `'GnuPG: 135F FC30 7A02 B0EB 61DB 34E3 3AF1 DC6C 9F7A 3FF8 `- Debian GNU/Linux -- The power of freedom pgp0.pgp Description: PGP signature
sudden 1476 segfault starting mysql
I've been using MySQL 4.12 on my RH9 laptop for quite some time just fine. I used the RPM's from the msql website. Today, I went to start mysql and I get the following error: [EMAIL PROTECTED] root]# /etc/init.d/mysql start [EMAIL PROTECTED] root]# Starting mysqld daemon with databases from /var/lib/mysql /usr/bin/mysqld_safe: line 320: 1476 Segmentation fault $NOHUP_NICENESS $ledir/$MYSQLD $defaults --basedir=$MY_BASEDIR_VERSION --datadir=$DATADIR $USER_OPTION --pid-file=$pid_file --skip-locking $err_log 21 030616 21:50:26 mysqld ended anyone have ideas on this? I can't think of anything I've done to the system that would suddenly cause this. That said, I did change the kernel in it recently (someone compiled one up that has ACPI in it) and added a line to /etc/sysctl.conf: # turn off exec-shield kernel.exec-shield = 0 But that shouldn't have anything to do with it, should it? -- .''`. Carl B. Constantine : :' : [EMAIL PROTECTED] `. `'GnuPG: 135F FC30 7A02 B0EB 61DB 34E3 3AF1 DC6C 9F7A 3FF8 `- Debian GNU/Linux -- The power of freedom pgp0.pgp Description: PGP signature
Re: mySQL GUIs
* Rodolphe Toots ([EMAIL PROTECTED]) wrote: hi! i am looking for a good mySQL gui for windows i have used mySQL front, which was an excellent free program, but i did not handle relations and diagrams. also the program is no longer being developed Try MySQL's own MySQL Control Center (mysqlcc): http://www.mysql.com/downloads/mysqlcc.html You need Qt, but Qt is available for many platforms, *nix, Win32, and Mac OS X too I believe. MySQLcc is a pretty nice product, reminds me a bit of pgAdmin II on Win32 (for the postgresql db). The other requirement is you need MySQL 4 if you want to compile it yourself, but binaries are available from the website that still work with 3.23.x -- .''`. Carl B. Constantine : :' : [EMAIL PROTECTED] `. `'GnuPG: 135F FC30 7A02 B0EB 61DB 34E3 3AF1 DC6C 9F7A 3FF8 `- Debian GNU/Linux -- The power of freedom pgp0.pgp Description: PGP signature
Re: Open-Source/Freeware Tool To Generate Entity Relationship Diagram s From Text File Containing SQL Scripts ?
* Eldrid Rensburg ([EMAIL PROTECTED]) wrote: I have exported tables from MySQL 3.23 to a text file script containing all its 'create table', indexing, etc, statements. Is there an open-source / freeware tool to generate Entity Relationship Diagrams from this script file ? If not what other tools exist ? The problem with this approach is that SQL Tables do NOT translate directly to ER. In some cases yes, but the ER is not necessarily the DB Schema and visa versa. Total relationships are not there in the schema but are in the ER for example. The same with aggregates and so forth. As to doing ER, you can use Dia http://www.lysator.liu.se/~alla/dia/ which will also do UML. Now, it shouldn't be hard to go from your SQL script file to a UML type diagram (ala Absess and Oracle) but I'm not aware of utils that do that either. -- .''`. Carl B. Constantine : :' : [EMAIL PROTECTED] `. `'GnuPG: 135F FC30 7A02 B0EB 61DB 34E3 3AF1 DC6C 9F7A 3FF8 `- Debian GNU/Linux -- The power of freedom pgp0.pgp Description: PGP signature
Re: Open-Source/Freeware Tool To Generate ER Diagrams From SQL Sc ripts ? - ImportER (ER Tool: Dezign)
* Eldrid Rensburg ([EMAIL PROTECTED]) wrote: Apparently, the reverse engineering add-on utility, ImportER, for the ER Tool, Dezign, see Free evaluation versions: www.datanamic.com/download/index.html can import MySQL tables directly. Having looked at that, it only runs on Windows. It also looks more like class diagrams (from the screenshots) than true ER, but I haven't looked at it in detail. Just my $0.02 worth. -- .''`. Carl B. Constantine : :' : [EMAIL PROTECTED] `. `'GnuPG: 135F FC30 7A02 B0EB 61DB 34E3 3AF1 DC6C 9F7A 3FF8 `- Debian GNU/Linux -- The power of freedom pgp0.pgp Description: PGP signature