1.gcc编译带有math.h的代码时,出现类似 limits.c:(.text+0xb1): undefined reference to `log'的错误
解决方法,在gcc选项里添加-lm选项,注意这个选项的添加位置,最好使用标准的选项位置,例如 gcc limits.c -lm -o limits
2.ubuntu12.04 mysql5.6.10 的root用户默认密码未知的解决办法
安装方法参照这篇
直接使用/etc/mysql/debian.cnf文件中[client]节提供的用户名和密码:
# mysql -udebian-sys-maint -p
Enter password: <输入[client]节的密码>
mysql> UPDATE user SET Password=PASSWORD('newpassword') where USER='root';
mysql> FLUSH PRIVILEGES;
mysql> quit
3.mysql新建帐号登录不了 ERROR 1045 (28000): Access denied for user 'rick'@'localhost' (using password: YES)
好吧,你应该是没重启mysql= =
4.gcc 编译时出现错误“expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’ token“
这个一般是自定义头文件错误,比如include前少了#,或少了>,或则其他定义错了,注意检查就能发现错误
2万+

被折叠的 条评论
为什么被折叠?



