Jump to content

random1

Members
  • Posts

    425
  • Joined

  • Last visited

Everything posted by random1

  1. Hi MySQL Gurus, I'm wondering if someone knows how to prevent mysqldump from adding new lines in stored procedures upon each database dump (backup). Alternatively a way of "removing all new lines from all stored procedure bodies in a database" as an SQL command would be awesome.
  2. Nullable? No.

  3. Thanks I ended up doing the following... 1) Stop MySQL Service 2) Initialize default mysql database ("data" folder) using command line mysqld.exe --initialize --user=mysql 3) Run (start) MySQL with passwords disabled mysqld.exe -u mysql --skip-grant-tables 4) Manually edit `mysql`.`user` table passwords
  4. I'm trying to fresh install the latest version of MySQL manually. When I download it from mysql.com I get the file "mysql-5.7.9-winx64.zip", but unlike previous versions it has no "data" folder and a near empty "my.ini" file. Could someone more learned let me know what is going on with this?
  5. The aim is to make my.cnf generic so that it can be more easily deployed to other network environments. I'm also trying to avoid creating a "generator" script that creates my.cnf.
  6. Hmm... I've worked out the syntax: ${VARIABLE} but it only partially works. :S
  7. I've worked out that Enviroment Variables can be reffered to using the syntax: ${VARIABLE}
  8. Thanks for the reply. I got it working by creating a .CMD file for creating the Windows Environment Variables (only Windows 7 or later): SETX DEV_SERVER_DIR D:\webserver /M SETX DEV_SERVER_APACHE_DIR D:\webserver\apache /M SETX DEV_SERVER_PHP_DIR D:\webserver\apache /M SETX DEV_SERVER_MYSQL_DIR "D:\webserver\mysql\MySQL Server 5.6" /M SETX DEV_SERVER_MYSQL_DATA_DIR "D:\webserver\mysql\MySQL Server 5.6\data" /M pause and then in PHP.ini, for example: [PHP] include_path = ".;${DEV_SERVER_APACHE_DIR}\htdocs" and start the Apache Windows Service and check the variable with phpinfo. thanks!
  9. I ain't no weeblewobble

  10. I'm running the latest stable version of PHP in Apache Server on Windows 7 64-bit. It working fine and set up correctly. I'd like to use ENVIRONMENT VARIABLES or a variable like "%current_directory%" or "..\%current_directory%" in the configuration files for PHP, php.ini. Is this possible? Is php.ini a parsed file, can variables be define and used in it? Help would be much appreciated
  11. I'm running the latest version of MySQL on Windows 7 64-bit. It working fine and set up correctly. I'd like to use ENVIRONMENT VARIABLES or a variable like "%current_directory%" or "..\%current_directory%" in the configuration files for MySQL, my.ini. Is this possible? Is my.ini a parsed file, can variables be define and used in it? Help would be much appreciated
  12. I'm running the latest version of Apache Server on Windows 7 64-bit. It working fine and set up correctly. I'd like to use ENVIRONMENT VARIABLES or a variable like "%current_directory%" or "..\%current_directory%" in the configuration files for Apache, httpd.conf etc. Is this possible? Is httpd.conf a parsed file, can variables be define and used in it? Help would be much appreciated
  13. preferably XML format but if the above is simply a JSON formatted response I'll check out using json_decode.
  14. Hey All, I am using a web service and am getting the response formatted like: http://pastebin.com/raw.php?i=AjDXXf66 e.g. [[["test","test","",""]],[["noun",["test","essai","épreuve","examen","contrôle","analyse","interrogation","épreuve pratique","épreuve de force"],[["test",["test"],,0.23752081],["essai",["test","trial","testing","essay","assay","try"],,0.12913783],["épreuve",["test","proof","trial","examination","print","crucible"],,0.028814545],["examen",["review","examination","test","investigation","inspection","testing"],,0.010767208] ... ... ... To my knowledge it is some kind of expression of a multidimentional array however I've never seen a response like this. Is there a way I can convert this format to clean XML?
  15. Update: After more work and research I have the code: @-webkit-keyframes FadeIn { 0% { opacity:0; } 100% { opacity:1; } } @-webkit-keyframes FadeOut { 0% { opacity:1; } 100% { opacity:0; } } @-moz-keyframes FadeIn { from { opacity:0; } to { opacity:1; } } @-moz-keyframes FadeOut { from { opacity:1; } to { opacity:0; } } @-o-keyframes FadeIn { from { opacity:0; } to { opacity:1; } } @-o-keyframes FadeOut { from { opacity:1; } to { opacity:0; } } @keyframes FadeIn { from { opacity:0; } to { opacity:1; } } @keyframes FadeOut { from { opacity:1; } to { opacity:0; } } #example { -webkit-animation:FadeIn ease-in 0.5s; -moz-animation:FadeIn ease-in 0.5s; -o-animation:FadeIn ease-in 0.5s; animation:FadeIn ease-in 0.5s; -webkit-animation-fill-mode:forwards; -moz-animation-fill-mode:forwards; -o-animation-fill-mode:forwards; animation-fill-mode:forwards; } and its working all but Internet Explorer. Any advice?
  16. I'm trying to fade in a div using CSS3 only. The CSS code I currently have written is: @-webkit-keyframes FadeIn { 0% { opacity:0; } 100% { opacity:1; } } #example { -webkit-animation-name:FadeIn; -webkit-animation-timing-function:ease-in; -webkit-animation-duration:2s; } This fades works in Google Chrome but not in Firefox, Internet Explorer or Opera (as I expect). How can expand on this code using CSS3 code to support Firefox, Internet Explorer and Opera etc?
  17. Hey All, The following runs fine: CREATE DEFINER=`root`@`localhost` PROCEDURE `procedure_admin_reset_autoincrement`(IN `tableName` VARCHAR(100), IN `incrementInteger` INT) LANGUAGE SQL DETERMINISTIC CONTAINS SQL SQL SECURITY DEFINER COMMENT 'Resets the AUTO_INCREMENT value for a table' BEGIN ALTER TABLE tableName AUTO_INCREMENT = 1; END But when I try changing "= 1" to "= incrementInteger" it fails: Am I missing something really obvious? :S :B Is an auto_increment value strongly typed?
  18. I have been developing a database in MySQL using the InnoDB starge engine. I'm trying to iron out slow performing queries I have in my database. My Slow Query Log contains: # Time: 120716 22:27:51 # User@Host: MYUSERNAME[MYUSERNAME] @ localhost [127.0.0.1] # Query_time: 0.002929 Lock_time: 0.002929 Rows_sent: 21 Rows_examined: 21 use webman; SET timestamp=1342441671; SELECT `language_string_id`, `language_string_name`,`language_string_text` FROM `language_korean` ORDER BY `language_string_id`; # User@Host: MYUSERNAME[MYUSERNAME] @ localhost [127.0.0.1] # Query_time: 0.002929 Lock_time: 0.002929 Rows_sent: 19 Rows_examined: 47 SET timestamp=1342441671; SELECT * FROM `view_language_list`; # User@Host: MYUSERNAME[MYUSERNAME] @ localhost [127.0.0.1] # Query_time: 0.000000 Lock_time: 0.000000 Rows_sent: 21 Rows_examined: 21 SET timestamp=1342441671; Both Queries: 1) SELECT `language_string_id`, `language_string_name`,`language_string_text` FROM `language_korean` ORDER BY `language_string_id`; 2) SELECT `language_wms`.`language_id` AS `language_id`,`language_wms`.`language_name` AS `language_name`,`language_wms`.`language_description` AS `language_description`,`language_wms`.`language_text_direction` AS `language_text_direction` from `language_wms` where `language_wms`.`language_status_id` order by `language_wms`.`language_ordering`,`language_wms`.`language_name` I ran EXPLAIN on them and got: 1) id;select_type;table;type;possible_keys;key;key_len;ref;rows;Extra 1;SIMPLE;language_korean;index;;PRIMARY;8;;21; 2) id;select_type;table;type;possible_keys;key;key_len;ref;rows;Extra 1;SIMPLE;language_wms;ALL;;;;;28;Using where; Using filesort Is there a way to speed up these queries and get them out of appearing in the slow query log?
  19. As per: http://www.queness.com/post/11156/speed-up-web-page-loading-by-deferring-javascript Does deferring JavaScript mean that it cannot be cached locally and needs to be fetched each time a page request is made? I've be not able to set the return as 402, Not Modified, like the rest of my CSS, JPG, PNG files.
  20. Part of my my.ini file is: [client] port=3306 collation_connection=utf8_unicode_ci default-character-set=utf8 [mysql] collation_connection=utf8_unicode_ci collation_database=utf8_unicode_ci default-character-set=utf8 [mysqld] port=3306 basedir="C:/webserver/mysql/" datadir="C:/ProgramData/MySQL/MySQL Server 5.5/Data/" user=mysql collation_server=utf8_unicode_ci character-set-server=utf8 init_connect='SET collation_connection = utf8_unicode_ci; SET NAMES utf8;' skip-character-set-client-handshake However when I check the server when running collation_connection = utf8_general_ci. Any ideas what I'm missing here? How can I set this value globally? BTW I'm running MySQL Server 5.5. Reference: http://dev.mysql.com/doc/refman/5.1/en/server-system-variables.html#sysvar_collation_connection
  21. I've got the basic code: html { font:normal normal normal 200%/normal Calibri, "Segoe UI", "Microsoft Sans Serif", Arial; } in a CSS file and form elements don't resize font-size correctly. :S Example: http://www.imgplace.com/viewimg406/5685/57screenshot4.png In the above image all form controls are the incorrect size? Why is this?
  22. My Data Table: CREATE TABLE IF NOT EXISTS `file_type` ( `filetype_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'The ID of the file type', `filetype_extension` varchar(50) COLLATE utf8_unicode_ci NOT NULL COMMENT 'The extension of the file type', `filetype_name` varchar(300) COLLATE utf8_unicode_ci NOT NULL COMMENT 'The name of the file type', `filetype_description` varchar(500) COLLATE utf8_unicode_ci NOT NULL COMMENT 'The Description of the file type', PRIMARY KEY (`filetype_id`) ) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; REPLACE INTO `file_type` (`filetype_id`, `filetype_extension`, `filetype_name`, `filetype_description`) VALUES (1, 'jpg', 'Joint Photographic Experts Group', 'A compression technique for color images that can reduce files sizes to about 5% of their normal size. Some detail is lost in the compression.'), (2, 'zip', 'ZIP Archive', 'An open standard for compression and decompression used widely for PC download archives, ZIP was developed by Phil Katz for his DOS-based program PKZip, and it is is now widely used on Windows-based programs such as WinZip and Drag and Zip.'), (3, 'pdf', 'Portable Document Format', 'A document-encoding process developed by Adobe that maintains page layout, fonts, and graphics.'), (4, 'exe', 'Executable', 'A program file in the Windows environment.'), (5, '7z', '7-Zip Archive', 'A highly compressed archive that contains files. Commonly used for backups and archiving.'); I'd like to convert the ordering of the table from: to: (i.e. Reordering the table alphabetically by the 'filename_extension' column) By this I don't mean ORDER BY in a SELECT statement, but I mean reordering the records themselves. Any ideas? (The table I'm showing here is just an example, the table I really want to order has over 15000 records)
  23. Thanks joel24. I'll merge that with my current code
  24. I'm trying to find out a way to create a procedure in MYSQL that calculates the difference in years, months, days and seconds between two timestamps. For example time between "2011-01-01 11:11:11" and "2012-05-05 05:05:05". The bits of code I have so far are: SELECT DATEDIFF('2010-10-08 18:23:13', '2010-09-21 21:40:36') AS days; SELECT UNIX_TIMESTAMP('2010-11-29 13:16:55') - UNIX_TIMESTAMP('2010-11-29 13:13:55') AS output; SELECT TIME_TO_SEC(TIMEDIFF('2010-08-20 12:01:00', '2010-08-20 12:00:00')) AS diff; Also the PHP version of this type of functionality I'm looking for is: http://stackoverflow.com/questions/676824/how-to-calculate-the-difference-between-two-dates-using-php
  25. Thanks for clearing this up for me
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.