ubuntu 安装mysql .......

lines 1-10/10(END)出现在ubuntu安装mysql过程中,不知道怎么解决,请大神帮助

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
关于Ubuntu16.04用tar.gz通用压缩包安装mysql5.7.17失败

系统Ubuntu16.04 64位 准备安装MySQL 57.7.17 概要 apt-cache search libaio #安装mysql依赖库 tar -zxvf -zxvf mysql-5.7.17-linux-glibc2.5-x86_64.tar.gz #解压压缩包 mv mysql-5.7.17-linux-glibc2.5-x86_64 mysql #修改名字 groupadd mysql #添加用户组 useradd -r -g mysql -s /bin/false mysql #添加用户 cd mysql #进入mysql目录 mkdir mysql-files #新建目录 chmod 750 mysql-files #给目录授权为mysql 用户 chown -R mysql . chgrp -R mysql . bin/mysqld --initialize --user=mysql --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data #初始化mysql数据库 bin/mysql_ssl_rsa_setup #创建SSL证书,密钥文件和RSA密钥对文件 chown -R root . #给当前目录授权为用户root chown -R mysql data mysql-files bin/mysqld_safe --user=mysql & #启动mysql 问题卡在这了 ![图片说明](https://img-ask.csdn.net/upload/201704/04/1491243943_360085.jpg) 详细步骤 1.安装准备 1.1查看自己的Linux系统版本 命令: cat /etc/issue 再具体点:uname -a 86_64就代表64位的系统 OK,咱们确定了自己的系统,现在去MySQL官网下载二进制压缩包源文件 1.2官网下载安装包 https://dev.mysql.com/downloads/mysql/ ![图片说明](https://img-ask.csdn.net/upload/201704/04/1491244259_939400.jpg) 选择对应的安装包 ![图片说明](https://img-ask.csdn.net/upload/201704/04/1491244281_48676.jpg) ![图片说明](https://img-ask.csdn.net/upload/201704/04/1491244297_258139.jpg) 下载的话,有两种方式: 1.从官网下载,然后用FTP软件上传到服务器上。 2.使用在线下载的方式,使用命令: wget -P /usr/local/support https://cdn.mysql.com//Downloads/MySQL-5.7/mysql-5.7.17-linux-glibc2.5-x86_64.tar.gz 注:-P /usr/local/support 是指定下载目录 不要问我为啥网速这么快。。。。我也震惊了 ![图片说明](https://img-ask.csdn.net/upload/201704/04/1491244091_52801.jpg) 2.开始安装: 参考官方文档 ①为了预防以前安装过mysql,导致旧版本遗留文件冲突,所以需要把以前安装的文件都删除掉 /etc/my.cnf /etc/msyql目录 查找命令: find / -name 文件名or目录名 删除命令: rm -rf 文件名or目录名 ②安装mysql的依赖库libaio 搜索命令 apt-cache search libaio apt-cache search libaio 如果搜索没有显示结果,就安装 安装命令:apt-get install libaio1 注:如果报错,则需要使用更新命令 apt-get update 更新后就可以安装依赖库了 ③解压压缩包 命令: tar -zxvf -zxvf mysql-5.7.17-linux-glibc2.5-x86_64.tar.gz ④改名字,便于操作 命令:mv mysql-5.7.17-linux-glibc2.5-x86_64 mysql ④添加用户组, 添加用户 groupadd mysql useradd -r -g mysql -s /bin/false mysql ⑤进入msyql目录,创建目录mysql-files cd mysql mkdir mysql-files ⑥给文件夹授权为用户mysql chmod 750 mysql-files chown -R mysql . chgrp -R mysql . ⑦初始化数据库 bin/mysqld --initialize --user=mysql --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data ⑧创建SSL证书,密钥文件和RSA密钥对文件 bin/mysql_ssl_rsa_setup ⑨给当前目录授权为用户root chown -R root . chown -R mysql data mysql-files ⑩问题来了 每当我执行到这个命令时,就卡那不懂了。。。。请教大神,这是为什么 bin/mysqld_safe --user=mysql & # Next command is optional ![图片说明](https://img-ask.csdn.net/upload/201704/04/1491244374_944582.jpg) 然后: 执行 mysql -u root -p 再输入密码,显示: ![图片说明](https://img-ask.csdn.net/upload/201704/04/1491244197_897753.png) 尝试解决 网上搜的方法: 在my.cnf 中添加sockt ![图片说明](https://img-ask.csdn.net/upload/201704/04/1491244246_429225.png) 使用该方法启动 mysql -p --socket=/tmp/mysql.sock ![图片说明](https://img-ask.csdn.net/upload/201704/04/1491244255_351582.png) 另外,参考这篇博客 http://ng2.site/mysql/2016/11/16/install-mysql-offline.html 也是安装失败,请大神指点! ------------------------------------------------------------------------------------------------------------------------------------------------------ PS: 我用apt-get install mysql-server 可以成功安装,但是用通用二进制压缩包离线安装一直安装不成功,这个问题纠结我很久了,成了心结,所以一定要解决掉!

关于ubentu mysql8.0 明明有mysql.h却出现找不到mysql.h的提示

在mysql文件夹下确实有mysql.h文件 可是编译头文件后出现如图所示的提示 实在没找到好方法 麻烦有经历的朋友帮忙解答 ![图片说明](https://img-ask.csdn.net/upload/201807/26/1532608866_363825.png)

在win10子系统ubuntu18.04下安装mysql5.7尝试重新启动的时候出现以下报错

在win10子系统ubuntu18.04下安装mysql5.7尝试重新启动的时候出现以下报错 1.安装mysql-server ``` root@PC-5200:/home/tom# apt-get -y install mysql-server ``` ``` Reading package lists... Done Building dependency tree Reading state information... Done The following package was automatically installed and is no longer required: libfreetype6 Use 'apt autoremove' to remove it. The following additional packages will be installed: libaio1 libcgi-fast-perl libcgi-pm-perl libencode-locale-perl libevent-core-2.1-6 libfcgi-perl libhtml-parser-perl libhtml-tagset-perl libhtml-template-perl libhttp-date-perl libhttp-message-perl libio-html-perl liblwp-mediatypes-perl libssl1.1 libtimedate-perl liburi-perl mysql-client-5.7 mysql-client-core-5.7 mysql-common mysql-server-5.7 mysql-server-core-5.7 Suggested packages: libdata-dump-perl libipc-sharedcache-perl libwww-perl mailx tinyca The following NEW packages will be installed: libaio1 libcgi-fast-perl libcgi-pm-perl libencode-locale-perl libevent-core-2.1-6 libfcgi-perl libhtml-parser-perl libhtml-tagset-perl libhtml-template-perl libhttp-date-perl libhttp-message-perl libio-html-perl liblwp-mediatypes-perl libtimedate-perl liburi-perl mysql-client-5.7 mysql-client-core-5.7 mysql-common mysql-server mysql-server-5.7 mysql-server-core-5.7 The following packages will be upgraded: libssl1.1 1 upgraded, 21 newly installed, 0 to remove and 136 not upgraded. Need to get 21.0 MB of archives. After this operation, 157 MB of additional disk space will be used. Get:1 http://mirrors.aliyun.com/ubuntu bionic/main amd64 mysql-common all 5.8+1.0.4 [7308 B] Get:2 http://mirrors.aliyun.com/ubuntu bionic-updates/main amd64 libaio1 amd64 0.3.110-5ubuntu0.1 [6476 B] Get:3 http://mirrors.aliyun.com/ubuntu bionic-security/main amd64 libssl1.1 amd64 1.1.1-1ubuntu2.1~18.04.5 [1300 kB] Get:4 http://mirrors.aliyun.com/ubuntu bionic-security/main amd64 mysql-client-core-5.7 amd64 5.7.28-0ubuntu0.18.04.4 [6644 kB] Get:5 http://mirrors.aliyun.com/ubuntu bionic-security/main amd64 mysql-client-5.7 amd64 5.7.28-0ubuntu0.18.04.4 [1943 kB] Get:6 http://mirrors.aliyun.com/ubuntu bionic-security/main amd64 mysql-server-core-5.7 amd64 5.7.28-0ubuntu0.18.04.4 [7432 kB] Get:7 http://mirrors.aliyun.com/ubuntu bionic/main amd64 libevent-core-2.1-6 amd64 2.1.8-stable-4build1 [85.9 kB] Get:8 http://mirrors.aliyun.com/ubuntu bionic-security/main amd64 mysql-server-5.7 amd64 5.7.28-0ubuntu0.18.04.4 [2932 kB] Get:9 http://mirrors.aliyun.com/ubuntu bionic/main amd64 libhtml-tagset-perl all 3.20-3 [12.1 kB] Get:10 http://mirrors.aliyun.com/ubuntu bionic/main amd64 liburi-perl all 1.73-1 [77.2 kB] Get:11 http://mirrors.aliyun.com/ubuntu bionic/main amd64 libhtml-parser-perl amd64 3.72-3build1 [85.9 kB] Get:12 http://mirrors.aliyun.com/ubuntu bionic/main amd64 libcgi-pm-perl all 4.38-1 [185 kB] Get:13 http://mirrors.aliyun.com/ubuntu bionic/main amd64 libfcgi-perl amd64 0.78-2build1 [32.8 kB] Get:14 http://mirrors.aliyun.com/ubuntu bionic/main amd64 libcgi-fast-perl all 1:2.13-1 [9940 B] Get:15 http://mirrors.aliyun.com/ubuntu bionic/main amd64 libencode-locale-perl all 1.05-1 [12.3 kB] Get:16 http://mirrors.aliyun.com/ubuntu bionic/main amd64 libhtml-template-perl all 2.97-1 [59.0 kB] Get:17 http://mirrors.aliyun.com/ubuntu bionic/main amd64 libtimedate-perl all 2.3000-2 [37.5 kB] Get:18 http://mirrors.aliyun.com/ubuntu bionic/main amd64 libhttp-date-perl all 6.02-1 [10.4 kB] Get:19 http://mirrors.aliyun.com/ubuntu bionic/main amd64 libio-html-perl all 1.001-1 [14.9 kB] Get:20 http://mirrors.aliyun.com/ubuntu bionic/main amd64 liblwp-mediatypes-perl all 6.02-1 [21.7 kB] Get:21 http://mirrors.aliyun.com/ubuntu bionic/main amd64 libhttp-message-perl all 6.14-1 [72.1 kB] Get:22 http://mirrors.aliyun.com/ubuntu bionic-security/main amd64 mysql-server all 5.7.28-0ubuntu0.18.04.4 [9940 B] Fetched 21.0 MB in 9s (2376 kB/s) Preconfiguring packages ... Selecting previously unselected package mysql-common. (Reading database ... 28663 files and directories currently installed.) Preparing to unpack .../0-mysql-common_5.8+1.0.4_all.deb ... Unpacking mysql-common (5.8+1.0.4) ... Selecting previously unselected package libaio1:amd64. Preparing to unpack .../1-libaio1_0.3.110-5ubuntu0.1_amd64.deb ... Unpacking libaio1:amd64 (0.3.110-5ubuntu0.1) ... Preparing to unpack .../2-libssl1.1_1.1.1-1ubuntu2.1~18.04.5_amd64.deb ... Unpacking libssl1.1:amd64 (1.1.1-1ubuntu2.1~18.04.5) over (1.1.0g-2ubuntu4.3) ... Selecting previously unselected package mysql-client-core-5.7. Preparing to unpack .../3-mysql-client-core-5.7_5.7.28-0ubuntu0.18.04.4_amd64.deb ... Unpacking mysql-client-core-5.7 (5.7.28-0ubuntu0.18.04.4) ... Selecting previously unselected package mysql-client-5.7. Preparing to unpack .../4-mysql-client-5.7_5.7.28-0ubuntu0.18.04.4_amd64.deb ... Unpacking mysql-client-5.7 (5.7.28-0ubuntu0.18.04.4) ... Selecting previously unselected package mysql-server-core-5.7. Preparing to unpack .../5-mysql-server-core-5.7_5.7.28-0ubuntu0.18.04.4_amd64.deb ... Unpacking mysql-server-core-5.7 (5.7.28-0ubuntu0.18.04.4) ... Selecting previously unselected package libevent-core-2.1-6:amd64. Preparing to unpack .../6-libevent-core-2.1-6_2.1.8-stable-4build1_amd64.deb ... Unpacking libevent-core-2.1-6:amd64 (2.1.8-stable-4build1) ... Setting up mysql-common (5.8+1.0.4) ... update-alternatives: using /etc/mysql/my.cnf.fallback to provide /etc/mysql/my.cnf (my.cnf) in auto mode Selecting previously unselected package mysql-server-5.7. (Reading database ... 28832 files and directories currently installed.) Preparing to unpack .../00-mysql-server-5.7_5.7.28-0ubuntu0.18.04.4_amd64.deb ... Unpacking mysql-server-5.7 (5.7.28-0ubuntu0.18.04.4) ... Selecting previously unselected package libhtml-tagset-perl. Preparing to unpack .../01-libhtml-tagset-perl_3.20-3_all.deb ... Unpacking libhtml-tagset-perl (3.20-3) ... Selecting previously unselected package liburi-perl. Preparing to unpack .../02-liburi-perl_1.73-1_all.deb ... Unpacking liburi-perl (1.73-1) ... Selecting previously unselected package libhtml-parser-perl. Preparing to unpack .../03-libhtml-parser-perl_3.72-3build1_amd64.deb ... Unpacking libhtml-parser-perl (3.72-3build1) ... Selecting previously unselected package libcgi-pm-perl. Preparing to unpack .../04-libcgi-pm-perl_4.38-1_all.deb ... Unpacking libcgi-pm-perl (4.38-1) ... Selecting previously unselected package libfcgi-perl. Preparing to unpack .../05-libfcgi-perl_0.78-2build1_amd64.deb ... Unpacking libfcgi-perl (0.78-2build1) ... Selecting previously unselected package libcgi-fast-perl. Preparing to unpack .../06-libcgi-fast-perl_1%3a2.13-1_all.deb ... Unpacking libcgi-fast-perl (1:2.13-1) ... Selecting previously unselected package libencode-locale-perl. Preparing to unpack .../07-libencode-locale-perl_1.05-1_all.deb ... Unpacking libencode-locale-perl (1.05-1) ... Selecting previously unselected package libhtml-template-perl. Preparing to unpack .../08-libhtml-template-perl_2.97-1_all.deb ... Unpacking libhtml-template-perl (2.97-1) ... Selecting previously unselected package libtimedate-perl. Preparing to unpack .../09-libtimedate-perl_2.3000-2_all.deb ... Unpacking libtimedate-perl (2.3000-2) ... Selecting previously unselected package libhttp-date-perl. Preparing to unpack .../10-libhttp-date-perl_6.02-1_all.deb ... Unpacking libhttp-date-perl (6.02-1) ... Selecting previously unselected package libio-html-perl. Preparing to unpack .../11-libio-html-perl_1.001-1_all.deb ... Unpacking libio-html-perl (1.001-1) ... Selecting previously unselected package liblwp-mediatypes-perl. Preparing to unpack .../12-liblwp-mediatypes-perl_6.02-1_all.deb ... Unpacking liblwp-mediatypes-perl (6.02-1) ... Selecting previously unselected package libhttp-message-perl. Preparing to unpack .../13-libhttp-message-perl_6.14-1_all.deb ... Unpacking libhttp-message-perl (6.14-1) ... Selecting previously unselected package mysql-server. Preparing to unpack .../14-mysql-server_5.7.28-0ubuntu0.18.04.4_all.deb ... Unpacking mysql-server (5.7.28-0ubuntu0.18.04.4) ... Setting up libhtml-tagset-perl (3.20-3) ... Setting up libevent-core-2.1-6:amd64 (2.1.8-stable-4build1) ... Processing triggers for ureadahead (0.100.0-21) ... Setting up libencode-locale-perl (1.05-1) ... Setting up libtimedate-perl (2.3000-2) ... Setting up libio-html-perl (1.001-1) ... Setting up liblwp-mediatypes-perl (6.02-1) ... Processing triggers for libc-bin (2.27-3ubuntu1) ... Setting up libaio1:amd64 (0.3.110-5ubuntu0.1) ... Setting up liburi-perl (1.73-1) ... Setting up libssl1.1:amd64 (1.1.1-1ubuntu2.1~18.04.5) ... Checking for services that may need to be restarted...done. Checking for services that may need to be restarted...done. Checking init scripts... Restarting services possibly affected by the upgrade: invoke-rc.d: could not determine current runlevel Services restarted successfully. Processing triggers for systemd (237-3ubuntu10.21) ... Setting up libhtml-parser-perl (3.72-3build1) ... Setting up libcgi-pm-perl (4.38-1) ... Processing triggers for man-db (2.8.3-2ubuntu0.1) ... Setting up mysql-client-core-5.7 (5.7.28-0ubuntu0.18.04.4) ... Setting up libfcgi-perl (0.78-2build1) ... Setting up libhttp-date-perl (6.02-1) ... Setting up libhtml-template-perl (2.97-1) ... Setting up mysql-server-core-5.7 (5.7.28-0ubuntu0.18.04.4) ... Setting up libcgi-fast-perl (1:2.13-1) ... Setting up libhttp-message-perl (6.14-1) ... Setting up mysql-client-5.7 (5.7.28-0ubuntu0.18.04.4) ... Setting up mysql-server-5.7 (5.7.28-0ubuntu0.18.04.4) ... invoke-rc.d: could not determine current runlevel * Stopping MySQL database server mysqld [ OK ] update-alternatives: using /etc/mysql/mysql.cnf to provide /etc/mysql/my.cnf (my.cnf) in auto mode Renaming removed key_buffer and myisam-recover options (if present) Cannot open /proc/net/unix: No such file or directory Cannot stat file /proc/1/fd/5: Operation not permitted Cannot stat file /proc/1/fd/10: Operation not permitted Cannot stat file /proc/1/fd/6: Operation not permitted Cannot stat file /proc/7/fd/7: Operation not permitted Cannot stat file /proc/7/fd/10: Operation not permitted Cannot stat file /proc/7/fd/5: Operation not permitted Created symlink /etc/systemd/system/multi-user.target.wants/mysql.service → /lib/systemd/system/mysql.service. invoke-rc.d: could not determine current runlevel Setting up mysql-server (5.7.28-0ubuntu0.18.04.4) ... Processing triggers for libc-bin (2.27-3ubuntu1) ... Processing triggers for ureadahead (0.100.0-21) ... Processing triggers for systemd (237-3ubuntu10.21) ... ``` 2.启动mysql服务 ``` root@PC-5200:/home/tom# systemctl start mysql.service ``` 3.出现如下报错 ``` System has not been booted with systemd as init system (PID 1). Can't operate. ```

ubuntu14.04安装MySQL5.6各种错,但是直接安装MySQL5.5就好了。

输入命令sudo apt-get install mysql-server-5.6 第一个问题的解决方式:https://help.aliyun.com/knowledge_detail/41124.html ``` 1.Reading package lists... Done Building dependency tree Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation: The following packages have unmet dependencies: mysql-server-5.6 : Depends: mysql-common (>= 5.6.22-1~) but 5.5.58-0ubuntu0.14.04.1 is to be installed E: Unable to correct problems, you have held broken packages. ``` 2. 2017-11-29 07:09:25 0 [Warning] Using unique option prefix key_buffer instead of key_buffer_size is deprecated and will be removed in a future release. Please use the full name instead. 2017-11-29 07:09:25 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details). 2017-11-29 07:09:25 0 [Note] /usr/sbin/mysqld (mysqld 5.6.33-0ubuntu0.14.04.1) starting as process 9131 ... start: Job failed to start invoke-rc.d: initscript mysql, action "start" failed. dpkg: error processing package mysql-server-5.6 (--configure): subprocess installed post-installation script returned error exit status 1 E: Sub-process /usr/bin/dpkg returned an error code (1) 第一个问题解决了。第二个问题搞了半个下午还是没弄成(我运行的时候根本就sock文件),最好卸载直接装成了5.5的了。

Ubuntu安装Mysql启动出错

小弟刚刚接触Linux,想安装一个mysql,按照这个步骤尝试安装[http://jingyan.baidu.com/article/4f7d5712d5f8181a2019270e.html](http://jingyan.baidu.com/article/4f7d5712d5f8181a2019270e.html ""),结果最后服务启动不了。 输入systemctl status mysql.service命令查看的时候显示 mysql.service - MySQL Community Server Loaded: loaded (/lib/systemd/system/mysql.service; disabled; vendor preset: enabled) Active: deactivating (final-sigterm) (Result: exit-code) Process: 17564 ExecStart=/usr/sbin/mysqld --daemonize --pid-file=/var/run/mysqld/mysqld.pid (code=exited, status=1/FAILURE) CGroup: /system.slice/mysql.service └─17566 /usr/sbin/mysqld --daemonize --pid-file=/var/run/mysqld/my... Nov 20 06:51:35 ubuntu mysqld[17564]: 2016-11-20T14:51:35.520393Z 0 [Note] ...d. Nov 20 06:51:35 ubuntu mysqld[17564]: mysqld: Table 'mysql.plugin' doesn't exist Nov 20 06:51:35 ubuntu mysqld[17564]: 2016-11-20T14:51:35.520736Z 0 [ERROR]...t. Nov 20 06:51:35 ubuntu mysqld[17564]: 2016-11-20T14:51:35.521871Z 0 [Warnin...d. Nov 20 06:51:35 ubuntu mysqld[17564]: 2016-11-20T14:51:35.522009Z 0 [Warnin...ey Nov 20 06:51:35 ubuntu mysqld[17564]: 2016-11-20T14:51:35.523079Z 0 [Note] ...06 Nov 20 06:51:35 ubuntu mysqld[17564]: 2016-11-20T14:51:35.523154Z 0 [Note] ...e. Nov 20 06:51:35 ubuntu mysqld[17564]: 2016-11-20T14:51:35.523182Z 0 [Note] ...'; Nov 20 06:51:35 ubuntu mysqld[17564]: 2016-11-20T14:51:35.523352Z 0 [Note] ...'. Nov 20 06:51:35 ubuntu systemd[1]: mysql.service: Control process exited, c...=1 Hint: Some lines were ellipsized, use -l to show in full. 输入journalctl -xe命令显示 -- Subject: Unit mysql.service has finished shutting down -- Defined-By: systemd -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel -- -- Unit mysql.service has finished shutting down. Nov 20 07:10:32 ubuntu systemd[1]: Starting MySQL Community Server... -- Subject: Unit mysql.service has begun start-up -- Defined-By: systemd -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel -- -- Unit mysql.service has begun starting up. Nov 20 07:10:33 ubuntu mysqld[32270]: 2016-11-20T15:10:33.122479Z 0 [Warning] TI Nov 20 07:10:33 ubuntu mysqld[32270]: 2016-11-20T15:10:33.124201Z 0 [Note] /usr/ Nov 20 07:10:33 ubuntu mysqld[32270]: 2016-11-20T15:10:33.127834Z 0 [Note] InnoD Nov 20 07:10:33 ubuntu mysqld[32270]: 2016-11-20T15:10:33.127858Z 0 [Note] InnoD Nov 20 07:10:33 ubuntu mysqld[32270]: 2016-11-20T15:10:33.127864Z 0 [Note] InnoD Nov 20 07:10:33 ubuntu mysqld[32270]: 2016-11-20T15:10:33.127869Z 0 [Note] InnoD Nov 20 07:10:33 ubuntu mysqld[32270]: 2016-11-20T15:10:33.127874Z 0 [Note] InnoD Nov 20 07:10:33 ubuntu mysqld[32270]: 2016-11-20T15:10:33.127879Z 0 [Note] InnoD Nov 20 07:10:33 ubuntu mysqld[32270]: 2016-11-20T15:10:33.128131Z 0 [Note] InnoD Nov 20 07:10:33 ubuntu mysqld[32270]: 2016-11-20T15:10:33.128221Z 0 [Note] InnoD Nov 20 07:10:33 ubuntu mysqld[32270]: 2016-11-20T15:10:33.129445Z 0 [Note] InnoD Nov 20 07:10:33 ubuntu mysqld[32270]: 2016-11-20T15:10:33.139914Z 0 [Note] InnoD Nov 20 07:10:33 ubuntu mysqld[32270]: 2016-11-20T15:10:33.141532Z 0 [Note] InnoD 请各位大牛帮忙看看怎么回事,不胜感激!

在线急求,,关于ubuntu安装mysql的问题

sudo gem install mysql 然后显示 Building native extensions. This could take a while... ERROR: Error installing mysql: ERROR: Failed to build gem native extension. /usr/bin/ruby1.8 extconf.rb checking for mysql_query() in -lmysqlclient... no checking for main() in -lm... yes checking for mysql_query() in -lmysqlclient... no checking for main() in -lz... no checking for mysql_query() in -lmysqlclient... no checking for main() in -lsocket... no checking for mysql_query() in -lmysqlclient... no checking for main() in -lnsl... yes checking for mysql_query() in -lmysqlclient... no *** extconf.rb failed *** Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers. Check the mkmf.log file for more details. You may need configuration options. Provided configuration options: --with-opt-dir --without-opt-dir --with-opt-include --without-opt-include=${opt-dir}/include --with-opt-lib --without-opt-lib=${opt-dir}/lib --with-make-prog --without-make-prog --srcdir=. --curdir --ruby=/usr/bin/ruby1.8 --with-mysql-config --without-mysql-config --with-mysql-dir --without-mysql-dir --with-mysql-include --without-mysql-include=${mysql-dir}/include --with-mysql-lib --without-mysql-lib=${mysql-dir}/lib --with-mysqlclientlib --without-mysqlclientlib --with-mlib --without-mlib --with-mysqlclientlib --without-mysqlclientlib --with-zlib --without-zlib --with-mysqlclientlib --without-mysqlclientlib --with-socketlib --without-socketlib --with-mysqlclientlib --without-mysqlclientlib --with-nsllib --without-nsllib --with-mysqlclientlib --without-mysqlclientlib Gem files will remain installed in /usr/lib/ruby/gems/1.8/gems/mysql-2.7 for inspection. Results logged to /usr/lib/ruby/gems/1.8/gems/mysql-2.7/gem_make.out 为什么? 另 rake db:create时,!!! The bundled mysql.rb driver has been removed from Rails 2.2. Please install the mysql gem and try again: gem install mysql. rake aborted! no such file to load -- mysql (See full trace by running task with --trace) 我的gem: actionmailer (2.3.2, 2.2.2) actionpack (2.3.2, 2.2.2) activerecord (2.3.2, 2.2.2) activeresource (2.3.2, 2.2.2) activesupport (2.3.2, 2.2.2) rails (2.3.2, 2.2.2) rake (0.8.7) rubygems-update (1.3.4) 没有mysql.cnf zlib1g 1:1.2.3.3.dfsg-12ubuntu2(已装) zlib1g-dev 1:1.2.3.3.dfsg-12ubuntu1(装不上去,) ,怎么样才能把mysql给弄好? [b]问题补充:[/b] 如果用 sudo apt-get install mysql 则会显示E: 无法找到软件包 mysql [b]问题补充:[/b] 那驱动呢,现在我只是想怎么解决我上面的问题啊,如果不行,怎么卸载我的mysql sudo gem uninstall mysql 没有用 [b]问题补充:[/b] 迁移数据库时,出现 rake aborted! An error has occurred, all later migrations canceled: Mysql::Error: Table 'activation_states' already exists: CREATE TABLE `activation_states` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `show_name` varchar(10)) ENGINE=InnoDB (See full trace by running task with --trace) 请问为什么,怎么解决?

ubuntu安装mysql失败,返回错误号1

错误信息如下,知道的朋友麻烦解答。非常感谢! software@ubuntu-sw4:~$ sudo apt-get install mysql-server 正在读取软件包列表... 完成 正在分析软件包的依赖关系树 正在读取状态信息... 完成 mysql-server 已经是最新的版本。 建议安装的软件包: tinyca mailx 下列软件包将被升级: mysql-server-5.5 升级了 1 个软件包,新安装了 0 个软件包,要卸载 0 个软件包,有 141 个软件包未被升级。 有 5 个软件包没有被完全安装或卸载。 需要下载 0 B/1,845 kB 的软件包。 解压缩后会消耗掉 32.7 MB 的额外空间。 debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: 资源暂时不可用 正在设置 debconf (1.5.51ubuntu2) ... debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: 资源暂时不可用 dpkg: 处理软件包 debconf (--configure)时出错: 子进程 已安装 post-installation 脚本 返回了错误号 1 在处理时有错误发生: debconf E: Sub-process /usr/bin/dpkg returned an error code (1)

ubuntu 16.04安装mysql,初始化数据库报错。

系统:阿里云 Ubuntu16.4 ,64位 mysql:5.7.17 问题描述: 使用官网64位tar.gz压缩包进行mysql安装。压缩包解压后,进行数据库初始化。 (5.7.17版本没有data目录,需要自己创建;mysql_install_db 文件在bin目录下, scripts目录取消) 执行命令: bin/mysql_install_db --user=mysql --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data 报错:如图 ![图片说明](https://img-ask.csdn.net/upload/201701/16/1484537699_845096.png) 这个问题困扰了我2天了。。。。网上好的的教程,都试过了,尴尬。。。请教大神指点 //=========================================== 更新。 现在我按照mysql官网文档进行安装,又出现问题了。

正在下载php_mysql.dll for php5

<div class="post-text" itemprop="text"> <p>I have installed php5.3.2 and MySql on Ubuntu 10.4.</p> <p>Now how do I add or download php_mysql.dll to add mysql support in php ?</p> <p>I have visited <a href="http://www.mysql.com/downloads/" rel="nofollow noreferrer">MySql Download page</a>, but I don't know what to download.</p> <p>Can someone point me in a right direction ?</p> <p>I am not sure, if this question might fit in <a href="http://www.superuser.com" rel="nofollow noreferrer">Superuser</a>.</p> <p>Thanks.</p> </div>

Ubuntu16.04 修改mysql 数据存储目录datadir 启动失败

Ubuntu16.04 修改mysql 数据存储目录datadir 启动失败 ,网上的各种方法都已经尝试,但是还是没有启动成功请教各位大神!!!!! 修改步骤 ## 创建 迁移文件夹 > cd /mnt > mkdir lib > cd lib && mkdir mysqldata > 数据存放在 /mnt/lib/mysqldata 修改所属用户 和所属用户组为 msyql > sudo chown -vR mysql:mysql /mnt/lib/mysqldata 修改权限 > sudo chmod -vR 700 /mnt/lib/mysqldata ### 迁移文件 停止服务 > sudo /etc/init.d/mysql stop 迁移数据 > cp -av /var/lib/mysql/* /mnt/lib/mysqldata # vim /etc/mysql/mysql.conf.d/mysqld.cnf 将 [mysqld] 组下的 datadir改为: datadir = /mnt/lib/mysqldata sudo vim /etc/apparmor.d/usr.sbin.mysqld 找到其中的 /var/lib/mysql/ r, /var/lib/mysql/** rwk, 两行权限声明,可以在前面加上#好注释掉。然后对照格式,加入新路径的权限声明: /mnt/lib/mysqldata/ r, /mnt/lib/mysqldata/** rwk 重启服务 配置文件修改成功后就可以重启数据库,重启数据库之前需要先重新载入apparmor配置文件,使用下面命令重新载入: > sudo /etc/init.d/apparmor restart >sudo /etc/init.d/mysql start 重启的时候 Starting mysql (via systemctl): mysql.serviceJob for mysql.service failed because the control process exited with error code. See "systemctl status mysql.service" and "journalctl -xe" for details. failed! root@iZm5e472vz1trxejt8m5akZ:/etc/mysql# systemctl status mysql.service ● mysql.service - MySQL Community Server Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled) Active: active (running) since Sat 2018-06-23 00:55:37 CST; 25s ago Process: 13418 ExecStartPost=/usr/share/mysql/mysql-systemd-start post (code=exited, status=0/SUCCESS) Process: 13408 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exited, status=0/SUCCESS) Main PID: 13417 (mysqld) CGroup: /system.slice/mysql.service └─13417 /usr/sbin/mysqld . 配置文件 内容 ``` # # The MySQL database server configuration file. # # You can copy this to one of: # - "/etc/mysql/my.cnf" to set global options, # - "~/.my.cnf" to set user-specific options. # # One can use all long options that the program supports. # Run program with --help to get a list of available options and with # --print-defaults to see which it would actually understand and use. # # For explanations see # http://dev.mysql.com/doc/mysql/en/server-system-variables.html # This will be passed to all mysql clients # It has been reported that passwords should be enclosed with ticks/quotes # escpecially if they contain "#" chars... # Remember to edit /etc/mysql/debian.cnf when changing the socket location. # Here is entries for some specific programs # The following values assume you have at least 32M ram [mysqld_safe] socket = /var/run/mysqld/mysqld.sock nice = 0 [mysqld] # # * Basic Settings # user = mysql pid-file = /var/run/mysqld/mysqld.pid socket = /var/run/mysqld/mysqld.sock port = 3306 basedir = /usr # datadir = /var/lib/mysql datadir = /mnt/lib/mysqldata tmpdir = /tmp lc-messages-dir = /usr/share/mysql skip-external-locking # # Instead of skip-networking the default is now to listen only on # localhost which is more compatible and is not less secure. bind-address = 0.0.0.0 # # * Fine Tuning # key_buffer_size = 16M max_allowed_packet = 16M thread_stack = 192K thread_cache_size = 8 # This replaces the startup script and checks MyISAM tables if needed # the first time they are touched myisam-recover-options = BACKUP #max_connections = 100 #table_cache = 64 #thread_concurrency = 10 # # * Query Cache Configuration # query_cache_limit = 1M query_cache_size = 16M # # * Logging and Replication # # Both location gets rotated by the cronjob. # Be aware that this log type is a performance killer. # As of 5.1 you can enable the log at runtime! #general_log_file = /var/log/mysql/mysql.log #general_log = 1 # # Error log - should be very few entries. # log_error = /var/log/mysql/error.log # # Here you can see queries with especially long duration #log_slow_queries = /var/log/mysql/mysql-slow.log #long_query_time = 2 #log-queries-not-using-indexes # # The following can be used as easy to replay backup logs or for replication. # note: if you are setting up a replication slave, see README.Debian about # other settings you may need to change. #server-id = 1 #log_bin = /var/log/mysql/mysql-bin.log expire_logs_days = 10 max_binlog_size = 100M #binlog_do_db = include_database_name #binlog_ignore_db = include_database_name # # * InnoDB # # InnoDB is enabled by default with a 10MB datafile in /var/lib/mysql/. # Read the manual for more InnoDB related options. There are many! # # * Security Features # # Read the manual, too, if you want chroot! # chroot = /var/lib/mysql/ # # For generating SSL certificates I recommend the OpenSSL GUI "tinyca". # # ssl-ca=/etc/mysql/cacert.pem # ssl-cert=/etc/mysql/server-cert.pem # ssl-key=/etc/mysql/server-key.pem ```

ubuntu 16.04 下安装mysql 数据库遇到如下问题,求大神帮忙解决

ubuntu 16.04 下安装mysql数据库遇到如下错误: 7月 19 17:24:07 wenyaxin-Lenovo-XiaoXin-310-15IKB systemd[1]: Failed to star... 7月 19 17:24:07 wenyaxin-Lenovo-XiaoXin-310-15IKB systemd[1]: mysql.service:... 7月 19 17:24:07 wenyaxin-Lenovo-XiaoXin-310-15IKB systemd[1]: mysql.service:... Hint: Some lines were ellipsized, use -l to show in full. dpkg: 处理软件包 mysql-server-5.7 (--configure)时出错: 子进程 已安装 post-installation 脚本 返回错误状态 1 dpkg: 依赖关系问题使得 mysql-server 的配置工作不能继续: mysql-server 依赖于 mysql-server-5.7;然而: 软件包 mysql-server-5.7 尚未配置。 dpkg: 处理软件包 mysql-server (--configure)时出错: 依赖关系问题 - 仍未被配置 正在处理用于 libc-bin (2.23-0ubuntu9) 的触发器 ... 因为错误消息指示这是由于上一个问题导致的错误,没有写入 apport 报告。 正在处理用于 systemd (229-4ubuntu17) 的触发器 ... 正在处理用于 ureadahead (0.100.0-19) 的触发器 ... 在处理时有错误发生: mysql-server-5.7 mysql-server E: Sub-process /usr/bin/dpkg returned an error code (1) 然后上网百度,基本上所有博客说的方法都是一样的。就是删除再弄 sudo rm /var/lib/mysql/ -R sudo rm /etc/mysql/ -R sudo apt-get autoremove mysql* --purge sudo apt-get remove apparmor // 输入Y回车 然后在装: sudo apt-get install mysql-server mysql-common //重新安装 我已经试过好几次了,都不行,每次删除之后,再安装,输入指令后, 然后就让设置密码,密码设置完后在过一会儿最后就又出现这个问题, 烦人,被这个问题困扰一下午了。我是刚接触linux系统,对这些根本 不了解,安装什么东西都是百度别人的教程,希望大神可以帮帮我, 出现这种情况是什么问题。

在ubuntu16.04上安装mysql 出现问题

执行以下语句 ``` sudo apt-get install mysql-server ``` 出现 ``` root@iZuf6cor8htiajrk5vtc76Z:~# sudo apt-get install mysql-server sudo: unable to resolve host iZuf6cor8htiajrk5vtc76Z Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package mysql-server ``` 求解

Ubuntu上安装mysql问题

``` root@iZ113kj9tt6Z:~# apt-get install mysql-server Reading package lists... Done Building dependency tree Reading state information... Done You might want to run 'apt-get -f install' to correct these: The following packages have unmet dependencies: mysql-server : Depends: mysql-server-5.5 but it is not going to be installed python-libvirt : Depends: libvirt0 (>= 0.9.8-2ubuntu17.22) but it is not going to be installed Recommends: libvirt-bin but it is not going to be installed E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution). ``` 小白求解答

mysql service mysql restart 启动失败

kali linux 64位,通过一键安装包安装了LAMP mysql安装的位置在/web/server/mysql ,系统启动后,所有服务运行正常 但是通过service mysql restart 启动失败 提示:/etc/init.d/mysql:WARING:/etc/mysql/my.cnf cannot be read See README.warnn.gz... 而/etc/ 下根本没有mysql文件夹,只有一个mysql.bak 每次停止mysql后,没办法启动,只能重启电脑 这种情况该怎么办呢?

PHP启动:无法加载动态库'pdo_mysql.so'UBUNTU 18.04

<div class="post-text" itemprop="text"> <p>Heres the full error:</p> <blockquote> <p>PHP Warning: PHP Startup: Unable to load dynamic library 'pdo_mysql.so' (tried: /usr/lib/php/20170718/pdo_mysql.so (/usr/lib/php/20170718/pdo_mysql.so: undefined symbol: mysqlnd_allocator), /usr/lib/php/20170718/pdo_mysql.so.so (/usr/lib/php/20170718/pdo_mysql.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0</p> </blockquote> <p>I am running Ubuntu 18.04.2 and using the xampp stack with php version 7.2.15</p> </div>

ubuntu 16.04安装mysql出现mysql-apt-config错误

root@ssk:~# sudo dpkg -i mysql-apt-config_0.5.3-1_all.deb (Reading database ... 97834 files and directories currently installed.) Preparing to unpack mysql-apt-config_0.5.3-1_all.deb ... Unpacking mysql-apt-config (0.5.3-1) over (0.5.3-1) ... Setting up mysql-apt-config (0.5.3-1) ... dpkg: error processing package mysql-apt-config (--install): subprocess installed post-installation script returned error exit status 10 Errors were encountered while processing: mysql-apt-config

无法在Ubuntu 14.04上安装Mysql 5.6

<div class="post-text" itemprop="text"> <p>I'm trying to upgrade from Mysql 5.5 to Mysql 5.6 on Ubuntu 14.04</p> <p>I've tried:</p> <ul> <li>Installing directly with <strong>sudo apt-get install mysql-server-5.6</strong> - no success</li> <li>Removing Mysql 5.5 fully first, according to this thread: <a href="https://stackoverflow.com/questions/10853004/removing-mysql-5-5-completely">Removing MySQL 5.5 Completely</a> then installing with sudo apt-get install mysql-server-5.6 - no success</li> <li>Creating 4g swap like explained here: <a href="https://askubuntu.com/questions/457923/why-did-installation-of-mysql-5-6-on-ubuntu-14-04-fail">https://askubuntu.com/questions/457923/why-did-installation-of-mysql-5-6-on-ubuntu-14-04-fail</a> - no success</li> </ul> <p>None of these options worked.. the error I get is this:</p> <pre><code>2015-07-06 02:32:33 12412 [Note] Plugin 'FEDERATED' is disabled. 2015-07-06 02:32:33 12412 [Note] InnoDB: Using atomics to ref count buffer pool pages 2015-07-06 02:32:33 12412 [Note] InnoDB: The InnoDB memory heap is disabled 2015-07-06 02:32:33 12412 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins 2015-07-06 02:32:33 12412 [Note] InnoDB: Compressed tables use zlib 1.2.8 2015-07-06 02:32:33 12412 [Note] InnoDB: Using Linux native AIO 2015-07-06 02:32:33 12412 [Note] InnoDB: Not using CPU crc32 instructions 2015-07-06 02:32:33 12412 [Note] InnoDB: Initializing buffer pool, size = 128.0M 2015-07-06 02:32:33 12412 [Note] InnoDB: Completed initialization of buffer pool 2015-07-06 02:32:33 12412 [Note] InnoDB: Highest supported file format is Barracuda. 2015-07-06 02:32:33 12412 [Note] InnoDB: 128 rollback segment(s) are active. 2015-07-06 02:32:33 12412 [Note] InnoDB: Waiting for purge to start 2015-07-06 02:32:33 12412 [Note] InnoDB: 5.6.19 started; log sequence number 1626183 2015-07-06 02:32:33 12412 [Note] Binlog end 2015-07-06 02:32:33 12412 [Note] InnoDB: FTS optimize thread exiting. 2015-07-06 02:32:33 12412 [Note] InnoDB: Starting shutdown... 2015-07-06 02:32:35 12412 [Note] InnoDB: Shutdown completed; log sequence number 1626193 start: Job failed to start invoke-rc.d: initscript mysql, action "start" failed. dpkg: error processing package mysql-server-5.6 (--configure): subprocess installed post-installation script returned error exit status 1 Setting up mysql-common-5.6 (5.6.19-0ubuntu0.14.04.1) ... </code></pre> <p>I can't set it up, getting really really frustrated</p> <p>Running on Digital Ocean VPS, please enlighten me masters :(</p> </div>

Ubuntu mysql的binlog只能放在/var/log/mysql下

mysql5.7 ubuntu16.4 binlog只能放在mysql配置文件默认的/var/log/mysql下,将路径修改为其他位置则提示权限不足 属主属组权限都给了myql,目录改为了777,依旧不行 /var/log/mysql目录权限 ```. root@ubuntu:/var/log/mysql# ll /var/log/mysql/ total 208 drwxr-x--- 2 mysql adm 4096 Jul 25 11:51 ./ drwxrwxr-x 7 root syslog 4096 Jul 25 10:08 ../ -rw-r----- 1 mysql adm 177095 Jul 25 11:51 error.log -rw-r----- 1 mysql mysql 177 Jul 25 11:39 mysql-bin.000001 -rw-r----- 1 mysql mysql 177 Jul 25 11:44 mysql-bin.000002 -rw-r----- 1 mysql mysql 177 Jul 25 11:49 mysql-bin.000003 -rw-r----- 1 mysql mysql 154 Jul 25 11:51 mysql-bin.000004 -rw-r----- 1 mysql mysql 128 Jul 25 11:51 mysql-bin.index ``` 属主属组完全相同但是还是报错 ```. 2019-07-25T03:50:31.499690Z 0 [Warning] Changed limits: max_open_files: 1024 (requested 5000) 2019-07-25T03:50:31.499875Z 0 [Warning] Changed limits: table_open_cache: 431 (requested 2000) 2019-07-25T03:50:31.678797Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details). 2019-07-25T03:50:31.681269Z 0 [Note] /usr/sbin/mysqld (mysqld 5.7.27-0ubuntu0.16.04.1-log) starting as process 22722 ... mysqld: File '/log/mysql-bin.index' not found (Errcode: 13 - Permission denied) 2019-07-25T03:50:31.685861Z 0 [ERROR] Aborting 2019-07-25T03:50:31.685940Z 0 [Note] Binlog end 2019-07-25T03:50:31.686079Z 0 [Note] /usr/sbin/mysqld: Shutdown complete 2019-07-25T03:50:46.822469Z 0 [Warning] Changed limits: max_open_files: 1024 (requested 5000) 2019-07-25T03:50:46.822565Z 0 [Warning] Changed limits: table_open_cache: 431 (requested 2000) 2019-07-25T03:50:47.029772Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details). 2019-07-25T03:50:47.032072Z 0 [Note] /usr/sbin/mysqld (mysqld 5.7.27-0ubuntu0.16.04.1-log) starting as process 22773 ... mysqld: File '/log/mysql-bin.index' not found (Errcode: 13 - Permission denied) 2019-07-25T03:50:47.037520Z 0 [ERROR] Aborting 2019-07-25T03:50:47.037610Z 0 [Note] Binlog end 2019-07-25T03:50:47.037763Z 0 [Note] /usr/sbin/mysqld: Shutdown complete 2019-07-25T03:51:17.533526Z 0 [Warning] Changed limits: max_open_files: 1024 (requested 5000) 2019-07-25T03:51:17.533655Z 0 [Warning] Changed limits: table_open_cache: 431 (requested 2000) 2019-07-25T03:51:17.791165Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details). 2019-07-25T03:51:17.793337Z 0 [Note] /usr/sbin/mysqld (mysqld 5.7.27-0ubuntu0.16.04.1-log) starting as process 22853 ... mysqld: File '/log/mysql-bin.index' not found (Errcode: 13 - Permission denied) 2019-07-25T03:51:17.798406Z 0 [ERROR] Aborting 2019-07-25T03:51:17.798466Z 0 [Note] Binlog end 2019-07-25T03:51:17.799262Z 0 [Note] /usr/sbin/mysqld: Shutdown complete ```

安装了mysqlconector 后然无法引入

我在ubuntu14.4上面操作,python2.7,mysql5.5 ,用了virtualenv, 当我在虚拟环境外安装好mysql-connector-python_2.0.4-1ubuntu14.04_all.deb后可以正常使用, ``` think@think-Inspiron-N4050:~/download$ sudo dpkg -i mysql-connector-python_2.0.4-1ubuntu14.04_all.deb [sudo] password for think: Selecting previously unselected package mysql-connector-python. (reading databse ...) Preparing to unpack mysql-connector-python_2.0.4-1ubuntu14.04_all.deb ... Unpacking mysql-connector-python (2.0.4-1ubuntu14.04) ... setting mysql-connector-python (2.0.4-1ubuntu14.04) ... think@think-Inspiron-N4050:~/download$ python Python 2.7.6 (default, Jun 22 2015, 18:00:18) [GCC 4.8.2] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import mysql.connector >>> exit() ``` 我需要在virtualenv环境下使用,于是我又在venv环境里安装了一个,安装正常,但是无法引入 ``` (venv)think@think-Inspiron-N4050:~/download$ dpkg -i mysql-connector-python_2.0.4-1ubuntu14.04_all.deb (venv)think@think-Inspiron-N4050:~/download$ sudo dpkg -i mysql-connector-python_2.0.4-1ubuntu14.04_all.deb (reading database ... ) Preparing to unpack mysql-connector-python_2.0.4-1ubuntu14.04_all.deb ... Unpacking mysql-connector-python (2.0.4-1ubuntu14.04) over (2.0.4-1ubuntu14.04) ... setting mysql-connector-python (2.0.4-1ubuntu14.04) ... (venv)think@think-Inspiron-N4050:~/download$ python Python 2.7.6 (default, Jun 22 2015, 18:00:18) [GCC 4.8.2] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import mysql.connector Traceback (most recent call last): File "<stdin>", line 1, in <module> ImportError: No module named mysql.connector ``` 请各位老师指点一下,谢谢

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

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

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

今年,我也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 是为...

立即提问
相关内容推荐