mysql的galera集群 执行大数据量的删除SQL时,事务堆积,数据库锁死,出现 system lock

在galera集群的一个节点上,执行大数据量的删除SQL时,其余节点的线程中出现 system lock ,系统锁死,不能进行任何写操作。

经分析,是galera不支持大事务 ,其余节点在执行事务写入时,出现事务堆积引起的。

哪位大神碰到过,现在有没有比较好的解决方案?
多谢赐教。

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
galera集群写操作很慢,各位高手有什么好的方法提高galera 集群的写速度吗?

情况如下: 我们每个月月底都会加载一部分数据到galera集群,而且这些文件基本上都是2~5G 左右,我们采用“insert into 正式表 select * from 临时表;”会出现记录数无法提 提交的情况,估计是由于提交的量比较大。然后我们使用工具分批导入的时候,发现一个3.5G的文件会消耗接近2个小时才可以入库,请问各位大拿有什么好的优化方法,谢谢?

求解:mysql-5.6,搭建galera 集群出现的问题。数据库添加集群相关参数后就起不来

报错: 2016-08-18 13:49:00 24069 [ERROR] /usr/local/mysql/bin/mysqld: unknown variable 'wsrep_provider=/usr/lib64/libgalera_smm.so' 2016-08-18 13:49:00 24069 [ERROR] Aborting 配置: [mysqld] pid-file=/usr/local/mysql/mysql_db3.pid binlog_format=ROW default-storage-engine=innodb innodb_autoinc_lock_mode=2 innodb_locks_unsafe_for_binlog=1 query_cache_size=0 query_cache_type=0 wsrep_provider=/usr/lib64/libgalera_smm.so wsrep_cluster_name="my_wsrep_cluster" wsrep_cluster_address="gcomm://192.168.0.15,192.168.0.16,192.168.0.17" wsrep_node_name=17 wsrep_node_address=17 wsrep_slave_threads=4 wsrep_sst_method=rsync wsrep_sst_auth=sst:bjyappam port = 3306 socket = /var/lib/mysql/mysql.sock skip-external-locking key_buffer_size = 256M max_allowed_packet = 1M table_open_cache = 256 sort_buffer_size = 1M read_buffer_size = 1M read_rnd_buffer_size = 4M myisam_sort_buffer_size = 64M thread_cache_size = 8 query_cache_size= 16M innodb_buffer_pool_size = 5000M thread_concurrency = 10 character_set_server=utf8 max_allowed_packet=256M log-bin=mysql-bin lower_case_table_names=1 basedir=/usr/local/mysql datadir=/data1/data binlog_format=row server-id = 3 innodb_flush_log_at_trx_commit = 0

PHP / PDO MariaDB Galera集群

<div class="post-text" itemprop="text"> <p>I am in the final stages of configuring a service that is accessible from four global locations (with plans to add more later). I will be running the servers on an Ubuntu 12.04 box with MariaDB. My initial thought was to create servers that run independently of each other with 4 distinct databases and live with the constraint that users would only be able to login to the server where they were initially registered.</p> <p>However, I have just run into <a href="https://www.digitalocean.com/community/articles/how-to-configure-a-galera-cluster-with-mariadb-on-ubuntu-12-04-servers" rel="nofollow noreferrer">this article</a> that has got me thinking... .</p> <p>From my reading of things if I set up a Galera cluster with master-master replication as suggested in the article I can move have the luxury of one large database that is consistently available across all four servers. I have gathered (and am hoping) that with the cluster setup correctly and functioning well I need do pretty much nothing in my PHP code (the four MariaDB instances will have the same user to access the database) - not even alter the PDO connection string.</p> <p>However, this sounds almost too good to be true. My questions are:</p> <ul> <li>are there other issues involved here that make for complications? </li> <li>Do the PHP PDO connection strings need to be altered in anway?</li> <li>Does the fact that my application is already structured to ensure that there is absolutely zero chance of two servers attempting to simultaneously write the same row help?</li> <li>And finally, reading from the <a href="https://mariadb.com/kb/en/what-is-mariadb-galera-cluster/" rel="nofollow noreferrer">MariaDB docs</a>, that this will not work with the TokuDB storage engine?</li> <li>Is there a way to specifically stop the replication of a selected table? Could I in fact exploit the "only InnoDB/XtraDB" constraint and use another storage engine on the table I do not want to have replicated?</li> </ul> </div>

mysql cluster数据节点启不了

[root@NDB1 bin]# ./ndbd --initial Unable to connect with connect string: nodeid=0,localhost:1186 Retrying every 5 seconds. Attempts left: 12 11 10 9 8 7 6 5 4 3 2 1, failed. 2016-04-03 06:33:35 **[ndbd] ERROR -- Could not connect to management server, error: ''** MGM节点配置如下: vi config.ini [ndbd default] NoOfReplicas=2 DataMemory=200M IndexMemory=30M [ndb_mgmd] NodeId=1 hostname=192.168.137.102 datadir=/var/lib/mysql-cluster/_ [ndbd] NodeId=2 hostname=192.168.137.101 datadir=/usr/local/mysql/data [ndbd] NodeId=3 hostname=192.168.137.103 datadir=/usr/local/mysql/data [mysqld] NodeId=4 hostname=192.168.137.104 [mysqld] NodeId=5 hostname=192.168.137.105 [mysqld] NodeId=6 **MGM启动正常:** [root@MGM bin]# ./ndb_mgm -- NDB Cluster -- Management Client -- ndb_mgm> show Connected to Management Server at: localhost:1186 Cluster Configuration --------------------- [ndbd(NDB)] 2 node(s) id=2 (not connected, accepting connect from 192.168.137.101) id=3 (not connected, accepting connect from 192.168.137.103) [ndb_mgmd(MGM)] 1 node(s) id=1 @192.168.137.102 (mysql-5.6.28 ndb-7.4.10) [mysqld(API)] 3 node(s) id=4 (not connected, accepting connect from 192.168.137.104) id=5 (not connected, accepting connect from 192.168.137.105) id=6 (not connected, accepting connect from any host) 但启动数据节点报错: [root@NDB1 bin]# ./ndbd --initial Unable to connect with connect string: nodeid=0,localhost:1186 Retrying every 5 seconds. Attempts left: 12 11 10 9 8 7 6 5 4 3 2 1, failed. 2016-04-03 06:33:35 [ndbd] ERROR -- Could not connect to management server, error: '' 在数据节点connect管理节点没有问题: [root@NDB1 bin]# ./ndb_mgm -- NDB Cluster -- Management Client -- ndb_mgm> connect 192.168.137.102 Connected to Management Server at: 192.168.137.102:1186 ndb_mgm> show Cluster Configuration --------------------- [ndbd(NDB)] 2 node(s) id=2 (not connected, accepting connect from 192.168.137.101) id=3 (not connected, accepting connect from 192.168.137.103) [ndb_mgmd(MGM)] 1 node(s) id=1 @192.168.137.102 (mysql-5.6.28 ndb-7.4.10) [mysqld(API)] 3 node(s) id=4 (not connected, accepting connect from 192.168.137.104) id=5 (not connected, accepting connect from 192.168.137.105) id=6 (not connected, accepting connect from any host)

mysql-cluster的启动问题

请问我rpm -qa | grep mysq 有 mysql-cluster-community-devel-7.5.4-1.el6.x86_64 mysql-cluster-community-server-7.5.4-1.el6.x86_64 mysql-cluster-community-common-7.5.4-1.el6.x86_64 mysql-cluster-community-client-7.5.4-1.el6.x86_64 mysql-cluster-community-libs-7.5.4-1.el6.x86_64 但是的我_ ndb_mgmd config.ini的时候为什么老说 -bash: ndb_mgmd: command not found

mariadb集群不能启动服务,问题为Failed to open channel

在自己的虚拟机上玩了mariadb集群,结果第一个节点配置后就mysql服务一直起不来 三个node节点和id如下: mairadb1:192.168.0.107 mairadb2:192.168.0.108 mairadb3:192.168.0.109 虚拟机机器环境为三个centOs7 64位 mariadb为yum直接安装的 其中mariadb1的配置/etc/my.cnf.d/server.cnf为(其他的节点把wsrep_node_name和wsrep_cluster_address对应改了就是) binlog_format=ROW default-storage-engine=innodb innodb_autoinc_lock_mode=2 innodb_locks_unsafe_for_binlog=1 query_cache_size=0 query_cache_type=0 bind-address=0.0.0.0 datadir=/var/lib/mysql innodb_log_file_size=100M innodb_file_per_table innodb_flush_log_at_trx_commit=2 wsrep_provider=/usr/lib64/galera/libgalera_smm.so wsrep_cluster_address="gcomm://192.168.0.107,192.168.0.108,192.168.0.109" wsrep_cluster_name='galera_cluster' wsrep_cluster_address="192.168.0.107" wsrep_node_name='mairadb1' wsrep_sst_method=rsync wsrep_sst_auth=tuang_user:123456 安装流程为: 1、yum 安装mariadb 添加/etc/yum.repos.d/mariadb.repo 然后yum install MariaDB-Galera-server MariaDB-client galera 2、启动service mysql start 3、初始化/usr/bin/mysql_secure_installation 4、在各个节点对应hostname的mysql执行如下操作 MariaDB [(none)]> grant all privileges on *.* to 'tuang_user'@'mairadb1' identified by '123456'; MariaDB [(none)]> flush privileges; 5、在/etc/my.cnf.d/server.cnf后添加如上配置 6、修改/etc/selinux/config中的SELINUX=disabled 7、重启环境 8、关闭防火墙后 /etc/init.d/mysql start --wsrep-new-cluster 结果就Starting MySQL........ ERROR! tail日志的结果为 160529 21:11:52 [ERROR] WSREP: gcs/src/gcs.cpp:gcs_open():1379: Failed to open channel 'galera_cluster' at '192.168.0.107': -22 (Invalid argument) 160529 21:11:52 [ERROR] WSREP: gcs connect failed: Invalid argument 160529 21:11:52 [ERROR] WSREP: wsrep::connect(192.168.0.107) failed: 7 160529 21:11:52 [ERROR] Aborting 160529 21:11:52 [Note] WSREP: Service disconnected. 160529 21:11:53 [Note] WSREP: Some threads may fail to exit. 160529 21:11:53 [Note] /usr/sbin/mysqld: Shutdown complete 160529 21:11:53 mysqld_safe mysqld from pid file /var/lib/mysql/mariadb1.pid ended 已确认防火墙以关闭,/usr/sbin/sestatus -v后SELINUX 也为disabled的 但就是起步来服务,求大神解答!

MariaDB避免死锁

<div class="post-text" itemprop="text"> <p>My original error was </p> <blockquote> <p>Error No: 1213 - Deadlock found when trying to get lock; try restarting transaction</p> </blockquote> <p>Okay, so I wrote a loop with max retries and a wait in between to try and get through the deadlocks. </p> <pre><code>$Try = 0; while (!$Result = $dbs-&gt;query($MySQL)) { $Try++; if ($Try === MYSQL_MAX_RETRIES) HandleMySQLError($dbs-&gt;error, $MySQL, false, $Test, $Trace); else sleep(MYSQL_RETRY_WAIT); } </code></pre> <p>But now I'm constantly getting some of the original error still, and a new error </p> <blockquote> <p>Got error 35 "Resource deadlock avoided" during COMMIT</p> </blockquote> <p>But I can't really seem to find out what this means or how to fix it?</p> <hr> <p><strong>EDIT</strong></p> <p>I left out a ton of information when I first wrote this, but the server is a RedHat 7 AWS EC2 (well, 3 of them) in a Galera &amp; MariaDB cluster.</p> <p>The query I am running is a call to a stored procedure </p> <pre><code>call`getchatmessages`('&lt;ChatID&gt;','&lt;UserID&gt;',from_unixtime('&lt;Some Timestamp&gt;')); </code></pre> <p>And the stored procedure is as follows</p> <pre><code>CREATE DEFINER=`root`@`%` PROCEDURE `getchatmessages`(IN `__ChatID` CHAR(36), IN `__UserID` CHAR(36), IN `__Timestamp` TIMESTAMP(6)) BEGIN DECLARE `__NewChatMessages` TINYINT(1) DEFAULT 0; DECLARE `__i` INT(11) DEFAULT 0; DECLARE `__Interval` INT(11) DEFAULT 100; -- ms DECLARE `__Timeout` INT(11) DEFAULT 15000; -- ms while `__NewChatMessages`=0 and `__i`&lt;`__Timeout`/`__Interval` do select 1 into `__NewChatMessages` from `chatmessages` where `ChatID`=`__ChatID` and `DateTimeAdded`&gt;ifnull(`__Timestamp`,0) limit 1; update `chatusers` set `DateTimeRead`=now(6) where `ChatID`=`__ChatID` and `UserID`=`__UserID`; do sleep(`__Interval`/1000); set `__i`=`__i`+1; end while; select `chatmessages`.`Body`, `chatmessages`.`ChatID`, `chatmessages`.`UserID`, `chatmessages`.`ChatMessageID`, `chatmessages`.`DateTimeAdded`, UNIX_TIMESTAMP(`chatmessages`.`DateTimeAdded`) `Timestamp`, `users`.`FirstName`, `users`.`LastName` from `chatmessages` join `users` using (`UserID`) where `chatmessages`.`ChatID`=`__ChatID` and `chatmessages`.`DateTimeAdded`&gt;ifnull(`__Timestamp`,0) order by `chatmessages`.`DateTimeAdded` desc limit 100; END </code></pre> </div>

mariadb安装后,非root无法mysql登录

**系统** ``` Ubuntu 16 ``` **安装方式** ``` sudo apt-get install mariadb-server python-pymysql ``` ** 两个疑问 ** 1. 非系统root不能通过mysql登录 2. MariaDB 接受空用户登录, 如何取消? user表没有 求科普, 感激不尽! ** 说明 ** * mysql已确认开启 ``` nginx@nginx-virtual-machine:~$ service mysql status ● mysql.service - LSB: Start and stop the mysql database server daemon Loaded: loaded (/etc/init.d/mysql; bad; vendor preset: enabled) Active: active (running) since Wed 2017-09-27 19:17:51 ULAST; 16h ago Docs: man:systemd-sysv-generator(8) Process: 29567 ExecStop=/etc/init.d/mysql stop (code=exited, status=0/SUCCESS) Process: 29603 ExecStart=/etc/init.d/mysql start (code=exited, status=0/SUCCESS) CGroup: /system.slice/mysql.service ├─29633 /bin/bash /usr/bin/mysqld_safe ├─29777 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib/m └─29778 logger -t mysqld -p daemon error ``` * root登录 ``` nginx@nginx-virtual-machine:~$ sudo mysql -uroot -psqlpass Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 46 Server version: 10.0.31-MariaDB-0ubuntu0.16.04.2 Ubuntu 16.04 Copyright (c) 2000, 2017, Oracle, MariaDB Corporation Ab and others. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. MariaDB [(none)]> show databases; +--------------------+ | Database | +--------------------+ | information_schema | | my_test | | mysql | | performance_schema | +--------------------+ 4 rows in set (0.00 sec) MariaDB [(none)]> ``` * 非root登录 ``` nginx@nginx-virtual-machine:~$ mysql -uroot -psqlpass ERROR 1698 (28000): Access denied for user 'root'@'localhost' ``` * root用户, 空用户登录 ``` root@nginx-virtual-machine:/home/nginx# mysql Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 48 Server version: 10.0.31-MariaDB-0ubuntu0.16.04.2 Ubuntu 16.04 Copyright (c) 2000, 2017, Oracle, MariaDB Corporation Ab and others. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. MariaDB [(none)]> ``` 但是查询不到默认用户 ``` MariaDB [mysql]> select * from user where 0 = length(User); Empty set (0.00 sec) MariaDB [mysql]> select count(1) from user; +----------+ | count(1) | +----------+ | 1 | +----------+ 1 row in set (0.00 sec) ``` 通过安全加固删除匿名账户后, 任然可以匿名登录. ``` nginx@nginx-virtual-machine:~$ sudo mysql_secure_installation NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY! In order to log into MariaDB to secure it, we'll need the current password for the root user. If you've just installed MariaDB, and you haven't set the root password yet, the password will be blank, so you should just press enter here. Enter current password for root (enter for none): OK, successfully used password, moving on... Setting the root password ensures that nobody can log into the MariaDB root user without the proper authorisation. You already have a root password set, so you can safely answer 'n'. Change the root password? [Y/n] n ... skipping. By default, a MariaDB installation has an anonymous user, allowing anyone to log into MariaDB without having to have a user account created for them. This is intended only for testing, and to make the installation go a bit smoother. You should remove them before moving into a production environment. Remove anonymous users? [Y/n] y ... Success! Normally, root should only be allowed to connect from 'localhost'. This ensures that someone cannot guess at the root password from the network. Disallow root login remotely? [Y/n] y ... Success! By default, MariaDB comes with a database named 'test' that anyone can access. This is also intended only for testing, and should be removed before moving into a production environment. Remove test database and access to it? [Y/n] y - Dropping test database... ... Success! - Removing privileges on test database... ... Success! Reloading the privilege tables will ensure that all changes made so far will take effect immediately. Reload privilege tables now? [Y/n] y ... Success! Cleaning up... All done! If you've completed all of the above steps, your MariaDB installation should now be secure. Thanks for using MariaDB! ```

如何删除linux下的mariadb安装包

我尝试安装mysql5.7.11,但在用rpm -ivh mysql下的common时已存在冲突,用rpm -qa|grep mariadb 时存在,可用rpm -e 删除时说找不到路径。用yum也没用,好像yun不能删除预装安装包。 我的系统是centos7. 求前辈帮忙。

MySQL,PHP - CPU过载

<div class="post-text" itemprop="text"> <p>I cannot pinpoint the problem and I'm looking for some assistance. I'm using VPS on Vultr, 2 vCore, 4GB RAM to run a Wordpress site on Ubuntu 16.04 (nginx, php-fpm, http/2 and currently deactivated redis). Wordpress stores data in post-meta table, and this table is in our case rather big.</p> <p>I'm observing top/htop proccess list and here is what happens.</p> <p>When I click on any page it loads pretty fast. When I click on another page following first one it can take up to 12 sec (!) to make sql query, generate a page and load it to user.</p> <p>So when I observe top/htop proccess list here is what happens.</p> <p>When user opens first page (whichever that is) it loads almost instantly, CPU jumps to 100% and stays at 100%, with some oscillations, for next 10 sec or so. In this period if user clicks on any next page link, he or she has to wait for those 10 sec of high CPU usage in order to have next page displayed. If user waits for this high CPU peak to drop, next page loads almost instantly, after which CPU peaks up, etc...</p> <p>Proccesses which make CPU peak are mysqld and php-fpm.</p> <p>Here is mysql tuner dump:</p> <pre><code>% Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 211k 100 211k 0 0 296k 0 --:--:-- --:--:-- --:--:-- 8295k &gt;&gt; MySQLTuner 1.7.9 - Major Hayden &lt;major@mhtx.net&gt; &gt;&gt; Bug reports, feature requests, and downloads at http://mysqltuner.com/ &gt;&gt; Run with '--help' for additional options and output filtering [--] Skipped version check for MySQLTuner script [OK] Logged in using credentials from Debian maintenance account. [OK] Currently running supported MySQL version 5.7.21-0ubuntu0.16.04.1 [OK] Operating on 64-bit architecture -------- Log file Recommendations [--] Log file: ktc.com.err(0B) [OK] Log file ktc.com.err exists [OK] Log file ktc.com.err is readable. **[!!] Log file ktc.com.err is empty** [OK] Log file ktc.com.err is smaller than 32 Mb [OK] ktc.com.err doesn't contain any warning. [OK] ktc.com.err doesn't contain any error. [--] 0 start(s) detected in ktc.com.err [--] 0 shutdown(s) detected in ktc.com.err -------- Storage Engine Statistics [--] Status: +ARCHIVE +BLACKHOLE +CSV -FEDERATED +InnoDB +MEMORY +MRG_MYISAM +MyISAM +PERFORMANCE_SCHEMA [--] Data in InnoDB tables: 557.5M (Tables: 109) [OK] Total fragmented tables: 0 -------- Security Recommendations [OK] There are no anonymous accounts for any database users [OK] All database users have passwords assigned [!!] User 'admin_default@%' does not specify hostname restrictions. [!!] User 'admin_gme@%' does not specify hostname restrictions. [!!] There is no basic password file list! -------- CVE Security Recommendations [--] Skipped due to --cvefile option undefined -------- Performance Metrics [--] Up for: 27m 26s (33K q [20.584 qps], 259 conn, TX: 988M, RX: 6M) [--] Reads / Writes: 96% / 4% [--] Binary logging is disabled [--] Physical Memory : 3.9G [--] Max MySQL memory : 338.9M [--] Other process memory: 249.1M [--] Total buffers: 169.0M global + 1.1M per thread (151 max threads) [--] P_S Max memory usage: 72B [--] Galera GCache Max memory usage: 0B [OK] Maximum reached memory usage: 173.5M (4.39% of installed RAM) [OK] Maximum possible memory usage: 338.9M (8.58% of installed RAM) [OK] Overall possible memory usage with other process is compatible with memory available [OK] Slow queries: 0% (0/33K) [OK] Highest usage of available connections: 2% (4/151) [OK] Aborted connections: 0.39% (1/259) [!!] name resolution is active : a reverse name resolution is made for each new connection and can reduce performance [!!] Query cache may be disabled by default due to mutex contention. [!!] Query cache efficiency: 0.0% (0 cached / 30K selects) [OK] Query cache prunes per day: 0 [OK] Sorts requiring temporary tables: 0% (21 temp sorts / 7K sorts) [OK] No joins without indexes [!!] Temporary tables created on disk: 72% (2K on disk / 3K total) [OK] Thread cache hit rate: 98% (4 created / 259 connections) [OK] Table cache hit rate: 20% (406 open / 2K opened) [OK] Open file limit used: 1% (13/1K) [OK] Table locks acquired immediately: 100% (171 immediate / 171 locks) -------- Performance schema [--] Memory used by P_S: 72B [--] Sys schema is installed. -------- ThreadPool Metrics [--] ThreadPool stat is disabled. -------- MyISAM Metrics [!!] Key buffer used: 18.3% (1M used / 8M cache) [OK] Key buffer size / total MyISAM indexes: 8.0M/43.0K [!!] Read Key buffer hit rate: 83.3% (126 cached / 21 reads) -------- InnoDB Metrics [--] InnoDB is enabled. [--] InnoDB Thread Concurrency: 0 [OK] InnoDB File per table is activated [!!] InnoDB buffer pool / data size: 128.0M/557.5M [!!] Ratio InnoDB log file size / InnoDB Buffer pool size (75 %): 48.0M * 2/128.0M should be equal 25% [OK] InnoDB buffer pool instances: 1 [--] Number of InnoDB Buffer Pool Chunk : 1 for 1 Buffer Pool Instance(s) [OK] Innodb_buffer_pool_size aligned with Innodb_buffer_pool_chunk_size &amp; Innodb_buffer_pool_instances [OK] InnoDB Read buffer efficiency: 99.47% (50550184 hits/ 50819499 total) [!!] InnoDB Write Log efficiency: 77.35% (5215 hits/ 6742 total) [OK] InnoDB log waits: 0.00% (0 waits / 1527 writes) -------- AriaDB Metrics [--] AriaDB is disabled. -------- TokuDB Metrics [--] TokuDB is disabled. -------- XtraDB Metrics [--] XtraDB is disabled. -------- RocksDB Metrics [--] RocksDB is disabled. -------- Spider Metrics [--] Spider is disabled. -------- Connect Metrics [--] Connect is disabled. -------- Galera Metrics [--] Galera is disabled. -------- Replication Metrics [--] Galera Synchronous replication: NO [--] No replication slave(s) for this server. [--] Binlog format: ROW [--] XA support enabled: ON [--] Semi synchronous replication Master: Not Activated [--] Semi synchronous replication Slave: Not Activated [--] This is a standalone server -------- Recommendations General recommendations: Restrict Host for user@% to user@SpecificDNSorIp MySQL was started within the last 24 hours - recommendations may be inaccurate Configure your accounts with ip or subnets only, then update your configuration with skip-name-resolve=1 When making adjustments, make tmp_table_size/max_heap_table_size equal Reduce your SELECT DISTINCT queries which have no LIMIT clause Before changing innodb_log_file_size and/or innodb_log_files_in_group read this: (link shortener deleted) Variables to adjust: query_cache_size (=0) query_cache_type (=0) query_cache_limit (&gt; 1M, or use smaller result sets) tmp_table_size (&gt; 16M) max_heap_table_size (&gt; 16M) innodb_buffer_pool_size (&gt;= 557.5M) if possible. innodb_log_file_size should be (=16M) if possible, so InnoDB total log files size equals to 25% of buffer pool size. </code></pre> </div>

求助mariadb安装后启动不了的问题

虚拟机上的cent0s6.2,安装mariadb5.5.20,按照以下步骤安装: shell> groupadd mysql shell> useradd -g mysql mysql shell> cd /usr/local shell> gunzip < /path/to/mysql-VERSION-OS.tar.gz | tar xvf - shell> ln -s full-path-to-mysql-VERSION-OS mysql shell> cd mysql shell> chown -R mysql . shell> chgrp -R mysql . shell> scripts/mysql_install_db --user=mysql shell> chown -R root . shell> chown -R mysql data shell> bin/mysqld_safe --user=mysql & 最后一步报错: [root@localhost mariadb-5.5.20-linux-x86_64]# bin/mysqld_safe --user=mysql & [1] 3074 [root@localhost mariadb-5.5.20-linux-x86_64]# 170406 05:10:57 mysqld_safe Logging to '/usr/local/mariadb-5.5.20-linux-x86_64/data/localhost.localdomain.err'. 170406 05:10:57 mysqld_safe Starting mysqld daemon with databases from /usr/local/mariadb-5.5.20-linux-x86_64/data 170406 05:11:00 mysqld_safe mysqld from pid file /usr/local/mariadb-5.5.20-linux-x86_64/data/localhost.localdomain.pid ended [1]+ Done bin/mysqld_safe --user=mysql 求助,这个百度了好长时间,没找到合适的解决方法。

大学四年自学走来,这些私藏的实用工具/学习网站我贡献出来了

大学四年,看课本是不可能一直看课本的了,对于学习,特别是自学,善于搜索网上的一些资源来辅助,还是非常有必要的,下面我就把这几年私藏的各种资源,网站贡献出来给你们。主要有:电子书搜索、实用工具、在线视频学习网站、非视频学习网站、软件下载、面试/求职必备网站。 注意:文中提到的所有资源,文末我都给你整理好了,你们只管拿去,如果觉得不错,转发、分享就是最大的支持了。 一、电子书搜索 对于大部分程序员...

在中国程序员是青春饭吗?

今年,我也32了 ,为了不给大家误导,咨询了猎头、圈内好友,以及年过35岁的几位老程序员……舍了老脸去揭人家伤疤……希望能给大家以帮助,记得帮我点赞哦。 目录: 你以为的人生 一次又一次的伤害 猎头界的真相 如何应对互联网行业的「中年危机」 一、你以为的人生 刚入行时,拿着傲人的工资,想着好好干,以为我们的人生是这样的: 等真到了那一天,你会发现,你的人生很可能是这样的: ...

程序员请照顾好自己,周末病魔差点一套带走我。

程序员在一个周末的时间,得了重病,差点当场去世,还好及时挽救回来了。

技术大佬:我去,你写的 switch 语句也太老土了吧

昨天早上通过远程的方式 review 了两名新来同事的代码,大部分代码都写得很漂亮,严谨的同时注释也很到位,这令我非常满意。但当我看到他们当中有一个人写的 switch 语句时,还是忍不住破口大骂:“我擦,小王,你丫写的 switch 语句也太老土了吧!” 来看看小王写的代码吧,看完不要骂我装逼啊。 private static String createPlayer(PlayerTypes p...

和黑客斗争的 6 天!

互联网公司工作,很难避免不和黑客们打交道,我呆过的两家互联网公司,几乎每月每天每分钟都有黑客在公司网站上扫描。有的是寻找 Sql 注入的缺口,有的是寻找线上服务器可能存在的漏洞,大部分都...

点沙成金:英特尔芯片制造全过程揭密

“亚马逊丛林里的蝴蝶扇动几下翅膀就可能引起两周后美国德州的一次飓风……” 这句人人皆知的话最初用来描述非线性系统中微小参数的变化所引起的系统极大变化。 而在更长的时间尺度内,我们所生活的这个世界就是这样一个异常复杂的非线性系统…… 水泥、穹顶、透视——关于时间与技艺的蝴蝶效应 公元前3000年,古埃及人将尼罗河中挖出的泥浆与纳特龙盐湖中的矿物盐混合,再掺入煅烧石灰石制成的石灰,由此得来了人...

讲一个程序员如何副业月赚三万的真实故事

loonggg读完需要3分钟速读仅需 1 分钟大家好,我是你们的校长。我之前讲过,这年头,只要肯动脑,肯行动,程序员凭借自己的技术,赚钱的方式还是有很多种的。仅仅靠在公司出卖自己的劳动时...

上班一个月,后悔当初着急入职的选择了

最近有个老铁,告诉我说,上班一个月,后悔当初着急入职现在公司了。他之前在美图做手机研发,今年美图那边今年也有一波组织优化调整,他是其中一个,在协商离职后,当时捉急找工作上班,因为有房贷供着,不能没有收入来源。所以匆忙选了一家公司,实际上是一个大型外包公司,主要派遣给其他手机厂商做外包项目。**当时承诺待遇还不错,所以就立马入职去上班了。但是后面入职后,发现薪酬待遇这块并不是HR所说那样,那个HR自...

女程序员,为什么比男程序员少???

昨天看到一档综艺节目,讨论了两个话题:(1)中国学生的数学成绩,平均下来看,会比国外好?为什么?(2)男生的数学成绩,平均下来看,会比女生好?为什么?同时,我又联想到了一个技术圈经常讨...

副业收入是我做程序媛的3倍,工作外的B面人生是怎样的?

提到“程序员”,多数人脑海里首先想到的大约是:为人木讷、薪水超高、工作枯燥…… 然而,当离开工作岗位,撕去层层标签,脱下“程序员”这身外套,有的人生动又有趣,马上展现出了完全不同的A/B面人生! 不论是简单的爱好,还是正经的副业,他们都干得同样出色。偶尔,还能和程序员的特质结合,产生奇妙的“化学反应”。 @Charlotte:平日素颜示人,周末美妆博主 大家都以为程序媛也个个不修边幅,但我们也许...

MySQL数据库面试题(2020最新版)

文章目录数据库基础知识为什么要使用数据库什么是SQL?什么是MySQL?数据库三大范式是什么mysql有关权限的表都有哪几个MySQL的binlog有有几种录入格式?分别有什么区别?数据类型mysql有哪些数据类型引擎MySQL存储引擎MyISAM与InnoDB区别MyISAM索引与InnoDB索引的区别?InnoDB引擎的4大特性存储引擎选择索引什么是索引?索引有哪些优缺点?索引使用场景(重点)...

如果你是老板,你会不会踢了这样的员工?

有个好朋友ZS,是技术总监,昨天问我:“有一个老下属,跟了我很多年,做事勤勤恳恳,主动性也很好。但随着公司的发展,他的进步速度,跟不上团队的步伐了,有点...

我入职阿里后,才知道原来简历这么写

私下里,有不少读者问我:“二哥,如何才能写出一份专业的技术简历呢?我总感觉自己写的简历太烂了,所以投了无数份,都石沉大海了。”说实话,我自己好多年没有写过简历了,但我认识的一个同行,他在阿里,给我说了一些他当年写简历的方法论,我感觉太牛逼了,实在是忍不住,就分享了出来,希望能够帮助到你。 01、简历的本质 作为简历的撰写者,你必须要搞清楚一点,简历的本质是什么,它就是为了来销售你的价值主张的。往深...

我说我不会算法,阿里把我挂了。

不说了,字节跳动也反手把我挂了。

优雅的替换if-else语句

场景 日常开发,if-else语句写的不少吧??当逻辑分支非常多的时候,if-else套了一层又一层,虽然业务功能倒是实现了,但是看起来是真的很不优雅,尤其是对于我这种有强迫症的程序"猿",看到这么多if-else,脑袋瓜子就嗡嗡的,总想着解锁新姿势:干掉过多的if-else!!!本文将介绍三板斧手段: 优先判断条件,条件不满足的,逻辑及时中断返回; 采用策略模式+工厂模式; 结合注解,锦...

离职半年了,老东家又发 offer,回不回?

有小伙伴问松哥这个问题,他在上海某公司,在离职了几个月后,前公司的领导联系到他,希望他能够返聘回去,他很纠结要不要回去? 俗话说好马不吃回头草,但是这个小伙伴既然感到纠结了,我觉得至少说明了两个问题:1.曾经的公司还不错;2.现在的日子也不是很如意。否则应该就不会纠结了。 老实说,松哥之前也有过类似的经历,今天就来和小伙伴们聊聊回头草到底吃不吃。 首先一个基本观点,就是离职了也没必要和老东家弄的苦...

为什么你不想学习?只想玩?人是如何一步一步废掉的

不知道是不是只有我这样子,还是你们也有过类似的经历。 上学的时候总有很多光辉历史,学年名列前茅,或者单科目大佬,但是虽然慢慢地长大了,你开始懈怠了,开始废掉了。。。 什么?你说不知道具体的情况是怎么样的? 我来告诉你: 你常常潜意识里或者心理觉得,自己真正的生活或者奋斗还没有开始。总是幻想着自己还拥有大把时间,还有无限的可能,自己还能逆风翻盘,只不是自己还没开始罢了,自己以后肯定会变得特别厉害...

男生更看重女生的身材脸蛋,还是思想?

往往,我们看不进去大段大段的逻辑。深刻的哲理,往往短而精悍,一阵见血。问:产品经理挺漂亮的,有点心动,但不知道合不合得来。男生更看重女生的身材脸蛋,还是...

为什么程序员做外包会被瞧不起?

二哥,有个事想询问下您的意见,您觉得应届生值得去外包吗?公司虽然挺大的,中xx,但待遇感觉挺低,马上要报到,挺纠结的。

当HR压你价,说你只值7K,你该怎么回答?

当HR压你价,说你只值7K时,你可以流畅地回答,记住,是流畅,不能犹豫。 礼貌地说:“7K是吗?了解了。嗯~其实我对贵司的面试官印象很好。只不过,现在我的手头上已经有一份11K的offer。来面试,主要也是自己对贵司挺有兴趣的,所以过来看看……”(未完) 这段话主要是陪HR互诈的同时,从公司兴趣,公司职员印象上,都给予对方正面的肯定,既能提升HR的好感度,又能让谈判气氛融洽,为后面的发挥留足空间。...

面试:第十六章:Java中级开发(16k)

HashMap底层实现原理,红黑树,B+树,B树的结构原理 Spring的AOP和IOC是什么?它们常见的使用场景有哪些?Spring事务,事务的属性,传播行为,数据库隔离级别 Spring和SpringMVC,MyBatis以及SpringBoot的注解分别有哪些?SpringMVC的工作原理,SpringBoot框架的优点,MyBatis框架的优点 SpringCould组件有哪些,他们...

面试阿里p7,被按在地上摩擦,鬼知道我经历了什么?

面试阿里p7被问到的问题(当时我只知道第一个):@Conditional是做什么的?@Conditional多个条件是什么逻辑关系?条件判断在什么时候执...

你打算用Java 8一辈子都不打算升级到Java 14,真香

我们程序员应该抱着尝鲜、猎奇的心态,否则就容易固步自封,技术停滞不前。

无代码时代来临,程序员如何保住饭碗?

编程语言层出不穷,从最初的机器语言到如今2500种以上的高级语言,程序员们大呼“学到头秃”。程序员一边面临编程语言不断推陈出新,一边面临由于许多代码已存在,程序员编写新应用程序时存在重复“搬砖”的现象。 无代码/低代码编程应运而生。无代码/低代码是一种创建应用的方法,它可以让开发者使用最少的编码知识来快速开发应用程序。开发者通过图形界面中,可视化建模来组装和配置应用程序。这样一来,开发者直...

面试了一个 31 岁程序员,让我有所触动,30岁以上的程序员该何去何从?

最近面试了一个31岁8年经验的程序猿,让我有点感慨,大龄程序猿该何去何从。

大三实习生,字节跳动面经分享,已拿Offer

说实话,自己的算法,我一个不会,太难了吧

程序员垃圾简历长什么样?

已经连续五年参加大厂校招、社招的技术面试工作,简历看的不下于万份 这篇文章会用实例告诉你,什么是差的程序员简历! 疫情快要结束了,各个公司也都开始春招了,作为即将红遍大江南北的新晋UP主,那当然要为小伙伴们做点事(手动狗头)。 就在公众号里公开征简历,义务帮大家看,并一一点评。《启舰:春招在即,义务帮大家看看简历吧》 一石激起千层浪,三天收到两百多封简历。 花光了两个星期的所有空闲时...

《经典算法案例》01-08:如何使用质数设计扫雷(Minesweeper)游戏

我们都玩过Windows操作系统中的经典游戏扫雷(Minesweeper),如果把质数当作一颗雷,那么,表格中红色的数字哪些是雷(质数)?您能找出多少个呢?文中用列表的方式罗列了10000以内的自然数、质数(素数),6的倍数等,方便大家观察质数的分布规律及特性,以便对算法求解有指导意义。另外,判断质数是初学算法,理解算法重要性的一个非常好的案例。

《Oracle Java SE编程自学与面试指南》最佳学习路线图(2020最新版)

正确选择比瞎努力更重要!

一文带你入门Java Stream流,太强了

两个星期以前,就有读者强烈要求我写一篇 Java Stream 流的文章,我说市面上不是已经有很多了吗,结果你猜他怎么说:“就想看你写的啊!”你看你看,多么苍白的喜欢啊。那就“勉为其难”写一篇吧,嘻嘻。 单从“Stream”这个单词上来看,它似乎和 java.io 包下的 InputStream 和 OutputStream 有些关系。实际上呢,没毛关系。Java 8 新增的 Stream 是为...

都前后端分离了,咱就别做页面跳转了!统统 JSON 交互

文章目录1. 无状态登录1.1 什么是有状态1.2 什么是无状态1.3 如何实现无状态1.4 各自优缺点2. 登录交互2.1 前后端分离的数据交互2.2 登录成功2.3 登录失败3. 未认证处理方案4. 注销登录 这是本系列的第四篇,有小伙伴找不到之前文章,松哥给大家列一个索引出来: 挖一个大坑,Spring Security 开搞! 松哥手把手带你入门 Spring Security,别再问密...

面试官:你连SSO都不懂,就别来面试了

大厂竟然要考我SSO,卧槽。

终于,月薪过5万了!

来看几个问题想不想月薪超过5万?想不想进入公司架构组?想不想成为项目组的负责人?想不想成为spring的高手,超越99%的对手?那么本文内容是你必须要掌握的。本文主要详解bean的生命...

我说我懂多线程,面试官立马给我发了offer

不小心拿了几个offer,有点烦

自从喜欢上了B站这12个UP主,我越来越觉得自己是个废柴了!

不怕告诉你,我自从喜欢上了这12个UP主,哔哩哔哩成为了我手机上最耗电的软件,几乎每天都会看,可是吧,看的越多,我就越觉得自己是个废柴,唉,老天不公啊,不信你看看…… 间接性踌躇满志,持续性混吃等死,都是因为你们……但是,自己的学习力在慢慢变强,这是不容忽视的,推荐给你们! 都说B站是个宝,可是有人不会挖啊,没事,今天咱挖好的送你一箩筐,首先啊,我在B站上最喜欢看这个家伙的视频了,为啥 ,咱撇...

代码注释如此沙雕,会玩还是你们程序员!

某站后端代码被“开源”,同时刷遍全网的,还有代码里的那些神注释。 我们这才知道,原来程序员个个都是段子手;这么多年来,我们也走过了他们的无数套路… 首先,产品经理,是永远永远吐槽不完的!网友的评论也非常扎心,说看这些代码就像在阅读程序员的日记,每一页都写满了对产品经理的恨。 然后,也要发出直击灵魂的质问:你是尊贵的付费大会员吗? 这不禁让人想起之前某音乐app的穷逼Vip,果然,穷逼在哪里都是...

2020春招面试了10多家大厂,我把问烂了的数据库事务知识点总结了一下

2020年截止目前,我面试了阿里巴巴、腾讯、美团、拼多多、京东、快手等互联网大厂。我发现数据库事务在面试中出现的次数非常多。

爬虫(101)爬点重口味的

小弟最近在学校无聊的很哪,浏览网页突然看到一张图片,都快流鼻血。。。然后小弟冥思苦想,得干一点有趣的事情python 爬虫库安装https://s.taobao.com/api?_ks...

立即提问
相关内容推荐