一 设置MySQL命令行搜索路径 0.苹果->系统偏好设置->最下边点mysql 在弹出页面中 启动mysql服务 1.打开终端,输入: sudo vi ~/.bash_profile 如果已存在删除: sudo rm -rf .bash_* 2.输入 i 3.然后粘贴以下内容 # mysql alias mysql='/usr/local/mysql/bin/mysql' alias mysqladmin='/usr/local/mysql/bin/mysqladmin' #…
Linux系统下给非root用户添加sudo权限 有时,在linux系统中非root用户运行sudo命令,会提示类似信息: xxx is not in the sudoers file. This incident will be reported. 这里,xxx是当前用户名,该用户无法执行sudo命令,这时候,解决方法如下: 1.进入超级用户模式.也就是输入"su -",系统会让你输入超级用户密码,输入密码后就进入了超级用户模式.(也可以直接用root登录): 2.给配置文件“/e…
官网地址:https://www.mongodb.com/ 在官网上选择不同的linux系统得到不同的下载地址,我们用的下载地址是:https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-rhel62-3.4.3.tgz 1.mongodb的安装及连接 cd opt/ wget https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-rhel62-3.4.3.tgz #下载 tar zx…
1.也不知是何原因,新安装好的MySQL,如果尝试用mysql -u root -p登陆就会出现这样的错误,但是root用户根本就没有设置密码. $ cd /usr/local$ cd mysql $ cd bin $ sudo ./mysql -u root -p Password: Sorry, try again. Password:(电脑密码) Enter password: (mysql root密码) Welcome to the MySQL monitor. Commands e…
用adduser新建的用户,当时只输入了一个用户名,没做其它操作,这样就建立了一个normal用户.在执行sudo vim hadoop-env.sh时,报“*** is not in the sudoers file. This incident will be reported.”. 经查询,网上的解决方案大多数都是: 执行visudo或vim /etc/sudoers命令,然后在root用户下面增加<username> ALL=(ALL) ALL 我相信这样一定可以解决问题,但这是杀鸡…