Fatal error: Call to undefined method mysqli_stmt::get_result()
原因是PHP透過MySQLi使用prepare statement, 必須要安裝mysqlnd driver
Mac環境似乎預設就有載入,
Reference:
1. mysqli_stmt::get_result
2. StackOverflow: Call to undefined method mysqli_stmt::get_result
3. MySQL Native Driver
標籤
ASP.NET MVC
(29)
Visual C#
(15)
JQuery
(10)
Plugins
(8)
JQuery Plugins
(6)
JavaScript
(6)
MySQL
(5)
CSS
(4)
LinQ
(4)
Mac OS
(4)
CentOS
(3)
Design Pattern
(3)
Entity Framework
(3)
IIS
(3)
Python
(3)
Windows
(3)
php
(3)
Docker
(2)
LAMP
(2)
SQL Server
(2)
WCF
(2)
.NET
(1)
.NET Core
(1)
AWS
(1)
Browser
(1)
GIS
(1)
IE
(1)
Internet Security
(1)
Linux
(1)
Platform
(1)
React
(1)
SEO
(1)
Testing
(1)
VMware
(1)
Windows 7
(1)
cookie
(1)
curl
(1)
laravel
(1)
phpBB
(1)
session
(1)
中古屋
(1)
透天
(1)
閒言閒語
(1)
面試
(1)
鳥松
(1)
2017年2月6日 星期一
2016年7月10日 星期日
[MySQL] Mac 啟動 MySQL 出現「ERROR! MySQL server PID file could not be found! ERROR! The server quit without updating PID file」
今天啟動MySQL服務時出現警告:
ERROR! MySQL server PID file could not be found!
ERROR! The server quit without updating PID file (/usr/local/mysql/data/XXX.pid).
回想一下因為更新brew更動到/usr/local/的目錄權限, 使用chown將目錄權限改回即可運作:
sudo chown _mysql /usr/local/var/mysql/*
Reference:
2016年3月2日 星期三
MySQL 新增table 顯示「Error: Tablespace for table xxx exists. Please DISCARD the tablespace before IMPORT」
前幾天要把某一張MySQL 的xxx table刪除後重新建立,建立時出現:
Error: Tablespace for table xxx exists. Please DISCARD the tablespace before IMPORT
上網google一下,發現是table的.idb檔案還殘留在系統中。
依照stackoverfkow的方法刪除idb檔案後,還是不能create,顯示有foreign key constraint ,原來是當初有人設定foreign key在xxx表的某個欄位,只好找出來把它刪掉,終於成功create table了。
可能當初就是加了foreign key後,沒有先刪除foreign key就直接刪除table所以造成table的.idb檔案殘留吧。
[Reference]:
1.Error: Tablespace for table xxx exists. Please DISCARD the tablespace before IMPORT
2.How do I see all foreign keys to a table or column?
2013年11月7日 星期四
[LinQ] LinQ to MySQL 出現 Outter Apply 語法不支援的問題
LinQ to MySQL
起因是因為LinQ會將 First() FirstOrDefault()此類方法的語法轉譯為Outter Apply ,
但是MySQL不支援此種語法。
目前看起來似乎無解,暫時使用Take()取代FirstOrDefault()是比較快速的方式
http://www.telerik.com/community/forums/aspnet-mvc/grid/outer-apply-is-not-supported.aspx
起因是因為LinQ會將 First() FirstOrDefault()此類方法的語法轉譯為Outter Apply ,
但是MySQL不支援此種語法。
目前看起來似乎無解,暫時使用Take()取代FirstOrDefault()是比較快速的方式
http://www.telerik.com/community/forums/aspnet-mvc/grid/outer-apply-is-not-supported.aspx
2011年9月15日 星期四
[MySQL] 還原資料庫時發生錯誤 Incorrect string value for column 'blahblahblah' at row 1
起因是要從某個 *.sql 的檔案還原至本機的MySQL Server,指令如下:


mysql -u root -p crazyshop1 -P 3306 < db_XXXX.sql
錯誤訊息如下:

Google一下發現應該是編碼沒有設定為UFT-8的關係:
於是在MySQL Workbench中設定,但是不管是使用AfterTable方式還是設定預設值,都無法排除錯誤:

最後經理在還原指令中指定預設編碼,就搞定收工了~
mysql --default-character-set utf8 -u root -p -P 3307 crazyshop < db_XXXX.sql
看來完全不懂MySQL,要加油了~
訂閱:
文章 (Atom)
