This blog details to import MySQL databases. You can import databases for a variety of scenarios linux centos and ubuntu
seen from China
seen from China
seen from Germany

seen from Netherlands
seen from China

seen from Germany

seen from China
seen from United States

seen from Australia
seen from United States
seen from India
seen from United Kingdom
seen from China
seen from China
seen from India

seen from United States

seen from United States

seen from Germany
seen from China
seen from Latvia
This blog details to import MySQL databases. You can import databases for a variety of scenarios linux centos and ubuntu
Install MySQL 5.6 database server in linux and configure mysql server you need to enable MySQL service Linux and install mysql client.
mysqld — The MySQL Server
mysqld — The MySQL Server
mysqld, also known as MySQL Server, is the main program that does most of the work in a MySQL installation. mysqld, is MySQL server daemon program which runs quietly in background on MySQL Database Server. MySQL Server manages access to the MySQL data directory that contains databases and tables. The data directory is also the default location for other information such as log files and status…
View On WordPress
Solution for the error below when connecting to MySQL daemon
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
Please note that:
This operation will delete all data in MySQL.
Root password will be cahnged and be shown on console
rm -rf /usr/local/var/mysql mysqld --initialize mysql_secure_installation
Mysql Recovery.
서버의 하드디스크 파일이 깨져 아래와 같은 메시지가 주기적으로 발생 했다.
하드가 문제인지 알았는데 wordpress와 phpbb3 도 동작 하지 않는다.
알고 보니 mysql 파일 중 innoDB 파일 ibdata1 이 깨졌다.
[ 8027.308041] ata1.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x0 [ 8027.308046] ata1.00: BMDMA stat 0x25 [ 8027.308050] ata1.00: failed command: READ DMA EXT [ 8027.308057] ata1.00: cmd 25/00:08:28:93:c8/00:00:46:00:00/e0 tag 0 dma 4096 in […
View On WordPress
One way to analyze valgrind error
Recently, I met a valgrind bug. I have struggled for more than one week but got nothing. It obsessed me because the deadline is close. Finally, I got the reason why caused such an error.
Now, I recorded what I have done so that I can avoid the same error during later work.
The valgrind error is like the follwings:
64 bytes in 1 blocks are definitely lost in loss record 1 of 1 a: malloc (vg_replace_malloc.c:291) b: my_malloc (my_malloc.c:192) b: String::real_alloc(unsigned long) (sql_string.cc:48) b: Item_func::fix_fields (item_func.cc:244) b: Item_str_func::fix_fields (item_strfunc.cc:101) b: unpack_gcol_info_from_frm (table.cc:2626) b: open_table_from_share (table.cc:3126) b: ha_create_table (handler.cc:4759) b: mysql_alter_table (sql_table.cc:9096) b: Sql_cmd_alter_table::execute (sql_alter.cc:324) b: mysql_execute_command (sql_parse.cc:4534) b: mysql_parse (sql_parse.cc:5245) b: dispatch_command (sql_parse.cc:1262) b: do_command (sql_parse.cc:815) b: handle_connection (connection_handler_per_thread.cc:301) b: pfs_spawn_thread (pfs.cc:2213) b: start_thread (pthread_create.c:309) b: clone (clone.S:115) LEAK SUMMARY: definitely lost: 64 bytes in 1 blocks indirectly lost: 0 bytes in 0 blocks possibly lost: 0 bytes in 0 blocks still reachable: 0 bytes in 0 blocks suppressed: 0 bytes in 0 blocks ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 2 from 2)
At first, according to the stack, the reason is one Item object is not freed. Most of time was spent to verify when the Item is freed. I used gdb and checked the free_items(This is the function in Mysql which free the Items during sql parse) function to see whether it's freed or not.
During such a process, I found there are many placed where need breakpoints. But I still kept on. I remembered each of the Item address and checked whether it’s freed or not. It’s boring and easy to miss something.
After the above try, I found I should add a deconstruct function where I freed the allocated memory. This try still failed.
I backed to the orignal idea which Item is not freed. So I add some DBUG_PRINT function in the construct and deconstruct function. By this information, I can easily observe which objects are constructed and deconstructed. After this change, the reason caused such an error showed. I found one Object was not deconstructed by the debug information. (Note, in order to get the debug output, you should add --debug=d:i:o,/tmp/mysqld.log option when start mysqld. By grep, I got the information I want.)
That’s all. All in all, deconstruct function with some debug information can help you locate when and where one Object is freed. Pls keep in mind, it will save you a lot of time to locate the error.
The event scheduler in MySQL needs to be enabled for some applications to work flawlessly. In this ...
Mysql server fails to start [error : 28]
sudo service mysqld start
Timeout error occurred trying to start MySQL Daemon.
Starting MySQL: [FAILED]
Logs /var/log/mysqld :
mysqld Error: unable to create temporary file; errno: 28
Can't start server : Bind on unix socket: No space left on device
1. Check /tmp for permissions and space availability
2. df -h
Filesystem Size Used Avail Use% Mounted on
/dev/xvd 37G 35G 0M 100% /
...
tmpfs 2.0G 0 2.0G 0% /dev/shm
Now, /tmp is under / which has 0 M available and is 100% used.
3. ls -lrt /tmp . Its lined up with loads of RackMultipart files
Reason: Paperclip Issue
Check the no. of such files
> ls -lrt /tmp/RackMultipart* | wc -l
> 297
4. Remove these files
rm -f /tmp/RackMultipart*
5. Try again
sudo service mysqld start
Starting MySQL: [ OK ]
sudo service mysqld status
mysqld (pid 17048) is running...
Ref: http://man.chinaunix.net/database/manual_MySQL/manual_Problems.html