Tag Info

Hot answers tagged

4

Query 1, tested in SQLFiddle-1 SET @ward_id_to_check = 1 ; SELECT st.patient_id, st.bed_id AS starting_bed_id, -- the first bed a patient uses -- can be omitted st.admitted, MIN(en.discharged) AS discharged FROM ( SELECT patient_id, bed_id, admitted, discharged FROM t WHERE ...


3

From 10.1.14.1 Unicode Character Sets in the MySQL 5.5 Reference Manual (emphasis added): For supplementary characters in general collations, the weight is the weight for 0xfffd REPLACEMENT CHARACTER. For supplementary characters in UCA collations, their collating weight is 0xfffd. That is, to MySQL, all supplementary characters are equal to each other, ...


2

Assuming a Staff table, it would be a query similar to this: SELECT s.*, -- needed columns from Staff table MIN(d.zipcodedistMiles) AS Miles_From_ZIP FROM Staff AS s LEFT JOIN tblZipCodeServed AS z ON z.zipcodeservedStaffID = s.StaffID LEFT JOIN tblZipCodeDist AS d ON d.zipcodedistStartZip = ...


2

SINGLE DATABASE DATABASE_TO_VIEW=mydb cd /var/lib/mysql/$(DATABASE_TO_VIEW) watch "ls -lt | grep ibd$ | head -20" If you want just the table names DATABASE_TO_VIEW=mydb cd /var/lib/mysql/$(DATABASE_TO_VIEW) watch "ls -lt | grep ibd$ | head -20 | awk '{print $9}' | sed 's/\.ibd//'" MULTIPLE DATABASES Create a script called /root/InnoDBChanges.sh with ...


2

Every replication event generated by the master includes the error code that resulted from execution of the query that generated the event. This is usually "success" (0, no error). When the slave executes a query, it expects the error it encounters to be the same error as the master encountered (again, usually "no error"). When this doesn't happen, ...


2

I am glad you found your own answer. I am sure you found out you can add this to my.cnf [mysqld] expire_logs_days = 14 You do not have to restart mysql. You login as root@localhost and run this: mysql> SET GLOBAL expire_logs_days = 14; To trigger the auto rotate immediately, run mysql> FLUSH LOGS; If you want to zap binary logs from the mysql ...


1

The ODBC Connection needs to be a System DSN. The connection is made as the service account, not you, and so the service account doesn't know about your User DSN. From the article: Select the System DSN tab to configure a data source for the entire system.


1

1) Any INSERT, UPDATE, ALTER etc type Query executed on the Master will be written to the Binary log, causing the MASTER_LOG_POS to increase Furthermore, if the Master is receiving updates from another Master (in a Master to Master setup), AND if you have LOG_SLAVE_UPDATES enabled these will be written to the Binary Log as well. Each time you restart the ...


1

Does mysqldump have an option that allows multi-valued inserts to be batched for each table? Yes. net_buffer_length - The initial size of the buffer for client/server communication.


1

I don't see any way as for future inserts you will need to have the index. Maybe consider adding another column to your table ensuring the uniqueness. This could be filled with a trigger function on new inserts.


1

What you want is called either Forward engineering (create a new set of schemas + db objects based on your model) or Synchronization (apply changes in your model to an existing setup and incorporate changes from that setup into your model). The latter feature works best if you first reverse engineered an existing setup into a model and work from there. ...


1

For purposes of this discussion, there is only one way to replicate from one MySQL server to another, and the post that you linked to does seem to describe it correctly. In this setup, the slave server needs to have the ability to establish a tcp connection to the master on port 3306. (The master never initiates this connection, so the connection only needs ...


1

The politically correct answer would be that you cannot perform MySQL Replication from a newer Master to an older Slave. You proven the politically correct answer to be wrong. Notwithstanding, the correct answer is you shouldn't do it, at least not for very long. Consequently, I have a very strong warning for you: It can be very unstable and you should ...



Only top voted, non community-wiki answers of a minimum length are eligible