phpmyadmin中导入mysql数据库时出现#1064的错误

静态分析:

分析时发现2个错误。

Unexpected beginning of statement. (near "phpMyAdmin" at position 0)
Unrecognized statement type. (near "SQL" at position 11)

SQL 查询:

phpMyAdmin SQL DumpSET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"

MySQL 返回:
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'phpMyAdmin SQL Dump

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"' at line 1
以上是错误的提示,求解决,谢谢啦!

1个回答

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
导入数据库的时候出现错误

导入数据库,但却说什么表结构的报错,郁闷了……………………求解答![图片](https://img-ask.csdn.net/upload/201510/13/1444740726_287613.png)

使用php将txt文件导入mysql数据库

<div class="post-text" itemprop="text"> <pre><code>&lt;?php include("includes/config.php"); if ($_POST['frmSubmit']) { $file = $_FILES['frmUpload']['tmp_name']; // Get Temporary filename if ($file) { $handle = fopen($file,"r"); // Open the file and read while ($strBookData = fgets($handle, 4096)) { $strData[] = $strBookData; $strDataCheck = str_replace(array(" ", " ", " "), "", $strData); $strRowCheck = explode('\t', implode($strDataCheck)); } foreach ($strRowCheck as $strRow){ if (!empty($strRow)) { $strRowValue = explode(' ', $strRow); $strDatas[] = $strRowValue; $strTableColumn = count($strRowValue); } } if ($strDatas) { $strInsertRecords = 0; $strDuplicationRecords = 0; if ($strTableColumn == 5) { for ($k=1; $k&lt;count($strDatas); $k++) { $strStatus = doCheckDuplication($strDatas[$k]['2']); if ($strStatus == 0) { doInsertEmployeeDetails($strDatas[$k]['0'], $strDatas[$k]['1'], $strDatas[$k]['2'], $strDatas[$k]['3'], $strDatas[$k]['4']); $strInsertRecords++; } else { $strDuplicationRecords++; } } if (count($strDatas)-1 == $strInsertRecords) { $strMsg = 'Employee details inserted successfully'; $strClass = 'Succes'; } if (count($strDatas)-1 != $strInsertRecords) { $strMsg = 'Employee details inserted successfully, some of names already exists'; $strClass = 'Error'; } if (count($strDatas)-1 == $strDuplicationRecords) { $strMsg = 'Employee details are already exists'; $strClass = 'Error'; } } else { $strMsg = 'Column mis-match, Please verify the file.'; $strClass = 'Error'; } } } else { $strMsg = 'Please upload a valid file.'; $strClass = 'Error'; } } ?&gt; &lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt; &lt;html xmlns="http://www.w3.org/1999/xhtml"&gt; &lt;head&gt; &lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&gt; &lt;title&gt;Employee Details&lt;/title&gt; &lt;link href="css/employee.css" rel="stylesheet" type="text/css"/&gt; &lt;script src="js/employee.js" type="text/javascript"&gt;&lt;/script&gt; &lt;/head&gt; &lt;body&gt; &lt;form id="frmEmployee" name="frmEmployee" enctype="multipart/form-data" method="post" action="" onsubmit="return validation();"&gt; &lt;div class="all"&gt; &lt;div class="main"&gt; &lt;div class="inner"&gt; &lt;div class="top"&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;div class="text" align="center"&gt; &lt;p class="det"&gt;EMPLOYEE DETAILS&lt;/p&gt; &lt;/div&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;/div&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;div align="center"&gt;&lt;p class="&lt;?php echo $strClass; ?&gt;"&gt;&lt;?php echo $strMsg; ?&gt;&lt;/p&gt;&lt;/div&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;div class="nnn"&gt; &lt;div class="name"&gt;Text file Upload:&lt;/div&gt; &lt;div class="field"&gt; &lt;label&gt; &lt;input type="file" name="frmUpload" id="frmUpload" onblur="checkEmpty('frmUpload', 'error_file', 'Please upload your file');"/&gt; &lt;/label&gt; &lt;/div&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;/div&gt; &lt;div class="span"&gt; &lt;div class="span2"&gt;&lt;span id="error_file"&gt;&lt;/span&gt;&lt;/div&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;/div&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;div class="submit"&gt; &lt;div class="sub"&gt; &lt;div class="but"&gt; &lt;label&gt; &lt;input type="submit" name="frmSubmit" id="frmSubmit" value="Submit" class="subb" /&gt; &lt;/label&gt; &lt;/div&gt; &lt;div class="but"&gt; &lt;label&gt; &lt;input type="reset" name="frmReset" id="frmReset" value="Reset" class="subb" /&gt; &lt;/label&gt; &lt;/div&gt; &lt;/div&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;/div&gt; &lt;/div&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;?php if ($_POST['frmSubmit']) { ?&gt; &lt;div class="info" id="one"&gt; &lt;table width="64%" border="1" bordercolor="#DEDEDE" class="tabb"&gt; &lt;tr&gt; &lt;td width="62%"&gt;&lt;p class="rec"&gt;Total Records:&lt;/p&gt; &lt;/td&gt; &lt;td width="38%"&gt;&lt;p class="rec"&gt;&lt;?php echo count($strDatas)-1; ?&gt;&lt;/p&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;p class="rec"&gt;Inserted Records:&lt;/p&gt;&lt;/td&gt; &lt;td&gt;&lt;p class="rec"&gt;&lt;?php echo $strInsertRecords; ?&gt;&lt;/p&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;p class="rec"&gt;Duplicate Records:&lt;/p&gt;&lt;/td&gt; &lt;td&gt;&lt;p class="rec"&gt;&lt;?php echo $strDuplicationRecords; ?&gt;&lt;/p&gt;&lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; &lt;/div&gt; &lt;?php } ?&gt; &lt;/div&gt; &lt;/div&gt; &lt;/form&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p>this is my code for importing a text file into mysql database. i check duplication with mail id in the records. now i want to display the duplicate records in my design. please help me. and my text file is:</p> <pre><code>Name Code Mail Designation Salary\t Hari 100 hari@gmail.com trainee 6000\t Syed 101 syed@gmail.com trainee 6000\t Raja 102 raja@gmail.com trainee 6000\t Murali 103 murali@gmail.com trainee 6000\t Giri 104 giri@gmail.com trainee 6000\t Sekar 105 sekar@gmail.com trainee 6000\t </code></pre> </div>

mysql导入数据库中文乱码

xampp导入数据库中文成乱码(把sql语句写在一个.sql文件里 直接导入该文件生成数据库) 望大神帮帮忙!

phpMyAdmin在尝试导出数据库时显示空白页面?

<div class="post-text" itemprop="text"> <p>Recently I uninstalled the Wamp Server and re-installed the newer version of Wamp Server which is 3.1.3</p> <p>Note: I am using Windows 10</p> <p>Below are all the details of Wamp Server:</p> <pre><code>Apache Version: 2.4.33 PHP Version: 5.6.35 MySQL Version: 5.7.21 phpMyAdmin Version: 4.7.9 </code></pre> <p>When I click on MYSQL Database in phpMyAdmin and then click on Export, the phpMyAdmin shows blank page. However, when I click on Import, phpMyAdmin doesn't show blank page at all. But the strange thing is when clicking on Export, phpMyAdmin shows Blank Page.</p> <p>Since, I'm trying to export a Database from phpMyAdmin, I need to make sure that the page doesn't go blank when clicking on "Export" button.</p> <p>I'm not sure regarding how to approach this problem because I'm very new in phpMyAdmin.</p> <p>Would be really helpful if any recommended advice or solution is provided.</p> </div>

求大神~ MySQL数据库导入失败

错误 SQL 查询: -- phpMyAdmin SQL Dump -- version 4.0.10.7 -- http://www.phpmyadmin.net -- -- 涓绘------------------------------------- -- -- 琛ㄧdmin', 0, '', 0, 0, 'blank', 'Y-m-d', 0, 'line', 'a:2:{s:5:"style";s:4:"dash";s:5:"items";s:2:"10";}', 10, 0, '', 0, 0, 1444481460, 0, 0), ( 488, 'html_html', 0, '', '', '', '<hr class=''da'' />', 1, 'admin', 0, '', 0, 0, 'blank', '', 0, 'line', 'a:2:{s:5:"style";s:4:"dash";s:5:"items";s:1:"0";}', 10, 0, '', 0, 0, 1444481460, 0, 0 ) , ( 489, 'html_html', 0, '', '', '', '<hr class=''da'' />', 1, 'admin', 0, '', 0, 0, 'blank', '', 0, 'line', 'a:2:{s:5:"style";s:4:"dash";s:5:"items";s:1:"0";}', 10, 0, '', 0, 0, 1444481459, 0, 0 ) ; MySQL 返回: #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '488, 'html_html', 0, '', '', '', '<hr class=''da'' />', 1, 'admin', 0, '', 0, 0,' at line 9

如何导入MySQL数据库?

<div class="post-text" itemprop="text"> <p>I am trying to move a DB to a new serve. My friend gave me the entire site and I uploaded to a server. He gave me a clean DB to avoid giving sensitive details. The site has a log in section, complete admin backend where I can populate the website for users to sign up but for some reason its missing a few things like my own admin access to the website and tables to give me access to the back end. </p> <p>The database connected successfully. I am able to add users and values through the phpMyAdmin but I don't know how to give myself admin access.</p> <p>Below is the code for the entire database file I uploaded to the server:</p> <pre><code>-- phpMyAdmin SQL Dump -- version 4.0.10deb1 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Jul 21, 2016 at 02:03 PM -- Server version: 5.5.49-0ubuntu0.14.04.1 -- PHP Version: 5.5.9-1ubuntu4.17 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8 */; -- -- Database: `transportation` -- -- -------------------------------------------------------- -- -- Table structure for table `tbl_3_vehicle_limit` -- CREATE TABLE IF NOT EXISTS `tbl_3_vehicle_limit` ( `limit_id` int(11) NOT NULL AUTO_INCREMENT, `soption` tinyint(4) NOT NULL, `dept_id` varchar(4) CHARACTER SET latin1 COLLATE latin1_general_ci NOT NULL, `user_id` int(11) NOT NULL, `from_date` date NOT NULL, `to_date` date NOT NULL, PRIMARY KEY (`limit_id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=48 ; -- -------------------------------------------------------- -- -- Table structure for table `tbl_abandon_trips` -- CREATE TABLE IF NOT EXISTS `tbl_abandon_trips` ( `abandon_id` bigint(20) NOT NULL AUTO_INCREMENT, `abandon_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `notes` text NOT NULL, `res_id` bigint(20) NOT NULL, `user_id` int(11) DEFAULT NULL, `mile_charges` double NOT NULL, `calculate_fine` tinyint(1) NOT NULL DEFAULT '0', `miles` smallint(6) NOT NULL DEFAULT '25', PRIMARY KEY (`abandon_id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1106 ; -- -------------------------------------------------------- -- -- Table structure for table `tbl_comment_log` -- CREATE TABLE IF NOT EXISTS `tbl_comment_log` ( `comment_id` bigint(20) NOT NULL AUTO_INCREMENT, `user_id` int(11) NOT NULL, `comments` text COLLATE latin1_general_ci NOT NULL, `comment_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`comment_id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci AUTO_INCREMENT=2 ; -- -------------------------------------------------------- -- -- Table structure for table `tbl_departments` -- CREATE TABLE IF NOT EXISTS `tbl_departments` ( `dept_id` varchar(4) COLLATE latin1_general_ci NOT NULL, `dept_name` varchar(50) COLLATE latin1_general_ci NOT NULL, `leader_f_name` varchar(15) COLLATE latin1_general_ci NOT NULL, `leader_l_name` varchar(15) COLLATE latin1_general_ci NOT NULL, `leader_phone` varchar(25) COLLATE latin1_general_ci NOT NULL, `leader_email` varchar(150) COLLATE latin1_general_ci NOT NULL, `reg_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `active` tinyint(1) NOT NULL DEFAULT '1', `deactive_date` date DEFAULT NULL, `dept_info` varchar(200) COLLATE latin1_general_ci NOT NULL, PRIMARY KEY (`dept_id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; -- -------------------------------------------------------- -- -- Table structure for table `tbl_driver_links_order` -- CREATE TABLE IF NOT EXISTS `tbl_driver_links_order` ( `link_id` mediumint(9) NOT NULL, `link_order` mediumint(9) NOT NULL, `driver_login` tinyint(1) NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -- -------------------------------------------------------- -- -- Table structure for table `tbl_global_settings` -- CREATE TABLE IF NOT EXISTS `tbl_global_settings` ( `id` int(11) NOT NULL, `leader_code` varchar(20) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -- -------------------------------------------------------- -- -- Table structure for table `tbl_info_links` -- CREATE TABLE IF NOT EXISTS `tbl_info_links` ( `link_id` mediumint(9) NOT NULL AUTO_INCREMENT, `link_title` varchar(100) NOT NULL, `link_text` text NOT NULL, `link_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `link_order` tinyint(4) NOT NULL DEFAULT '1', `link_display_page` varchar(25) NOT NULL, `link_display_flag` char(1) DEFAULT NULL, PRIMARY KEY (`link_id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=30 ; -- -------------------------------------------------------- -- -- Table structure for table `tbl_log` -- CREATE TABLE IF NOT EXISTS `tbl_log` ( `log_id` bigint(20) NOT NULL AUTO_INCREMENT, `user_id` int(11) NOT NULL, `login_datetime` datetime NOT NULL, `logout_datetime` datetime NOT NULL, `ip_address` varchar(16) NOT NULL, PRIMARY KEY (`log_id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=16735 ; -- -------------------------------------------------------- -- -- Table structure for table `tbl_reservations` -- CREATE TABLE IF NOT EXISTS `tbl_reservations` ( `res_id` bigint(20) NOT NULL AUTO_INCREMENT, `vehicle_id` bigint(20) NOT NULL, `user_id` int(11) NOT NULL, `planned_passngr_no` varchar(2) COLLATE latin1_general_ci NOT NULL, `coord_approval` varchar(15) COLLATE latin1_general_ci NOT NULL DEFAULT 'Approved', `planned_depart_day_time` datetime NOT NULL, `planned_return_day_time` datetime NOT NULL, `overnight` tinyint(1) NOT NULL, `childseat` tinyint(1) NOT NULL, `destination` varchar(100) COLLATE latin1_general_ci NOT NULL, `reservation_cancelled` tinyint(1) NOT NULL DEFAULT '0', `reg_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `cancelled_by_driver` tinyint(1) NOT NULL DEFAULT '0', `driver_cancelled_time` datetime DEFAULT NULL, `key_no` varchar(4) COLLATE latin1_general_ci DEFAULT NULL, `card_no` varchar(8) COLLATE latin1_general_ci DEFAULT NULL, `billing_dept` varchar(4) COLLATE latin1_general_ci NOT NULL, `assigned_driver` int(11) NOT NULL, `repeating` tinyint(1) NOT NULL DEFAULT '0', `res_delete_user` bigint(20) DEFAULT NULL, `res_delete_datetime` datetime DEFAULT NULL, `no_cost` tinyint(1) NOT NULL DEFAULT '0', PRIMARY KEY (`res_id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci AUTO_INCREMENT=18416 ; -- -------------------------------------------------------- -- -- Table structure for table `tbl_restricted_charges` -- CREATE TABLE IF NOT EXISTS `tbl_restricted_charges` ( `charge_id` int(11) NOT NULL AUTO_INCREMENT, `vehicle_id` int(11) NOT NULL, `charge_month` varchar(2) CHARACTER SET latin1 COLLATE latin1_general_ci NOT NULL, `charge_year` char(4) CHARACTER SET latin1 COLLATE latin1_general_ci NOT NULL, `dept_id` varchar(4) CHARACTER SET latin1 COLLATE latin1_general_ci NOT NULL, `calc_method` varchar(50) CHARACTER SET latin1 COLLATE latin1_general_ci NOT NULL, `total_charge` double NOT NULL, `begin_mileage` varchar(7) CHARACTER SET latin1 COLLATE latin1_general_ci DEFAULT NULL, `end_mileage` varchar(7) CHARACTER SET latin1 COLLATE latin1_general_ci DEFAULT NULL, `rate` double DEFAULT NULL, `reg_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`charge_id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=745 ; -- -------------------------------------------------------- -- -- Table structure for table `tbl_shop_tasks` -- CREATE TABLE IF NOT EXISTS `tbl_shop_tasks` ( `task_id` bigint(20) NOT NULL AUTO_INCREMENT, `user_id` int(11) NOT NULL, `vehicle_id` int(11) NOT NULL, `miles_reading_tech` varchar(7) COLLATE latin1_general_ci NOT NULL, `last_mileage` varchar(7) COLLATE latin1_general_ci NOT NULL, `work_type_id` tinyint(4) NOT NULL, `work_start_date` date NOT NULL, `next_oil` date NOT NULL, `total_cost` double NOT NULL, `parts_source` varchar(255) COLLATE latin1_general_ci NOT NULL, `drive_test_done` tinyint(1) NOT NULL, `task_complete` tinyint(1) NOT NULL, `tech_comments` text COLLATE latin1_general_ci NOT NULL, `reg_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `invoice_no` varchar(50) COLLATE latin1_general_ci NOT NULL, `vendor_name` varchar(50) COLLATE latin1_general_ci NOT NULL, PRIMARY KEY (`task_id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci AUTO_INCREMENT=40 ; -- -------------------------------------------------------- -- -- Table structure for table `tbl_special_notice` -- CREATE TABLE IF NOT EXISTS `tbl_special_notice` ( `notice_id` int(11) NOT NULL AUTO_INCREMENT, `notice_date` datetime NOT NULL, `user_id` int(11) NOT NULL, `notice_title` varchar(255) CHARACTER SET latin1 COLLATE latin1_general_ci NOT NULL, `notice` text CHARACTER SET latin1 COLLATE latin1_general_ci NOT NULL, PRIMARY KEY (`notice_id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ; -- -------------------------------------------------------- -- -- Table structure for table `tbl_srvc_resvs` -- CREATE TABLE IF NOT EXISTS `tbl_srvc_resvs` ( `srvc_id` int(11) NOT NULL AUTO_INCREMENT, `reg_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `vehicle_id` int(11) NOT NULL, `from_date` datetime DEFAULT NULL, `to_date` datetime DEFAULT NULL, `is_cancelled` tinyint(1) NOT NULL DEFAULT '0', `service_type` varchar(15) NOT NULL, PRIMARY KEY (`srvc_id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=235 ; -- -------------------------------------------------------- -- -- Table structure for table `tbl_srvc_resvs_details` -- CREATE TABLE IF NOT EXISTS `tbl_srvc_resvs_details` ( `srvc_id` int(11) NOT NULL, `res_id` bigint(20) NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -- -------------------------------------------------------- -- -- Table structure for table `tbl_temp_mass_emails` -- CREATE TABLE IF NOT EXISTS `tbl_temp_mass_emails` ( `email_id` varchar(250) NOT NULL, `driver_name` varchar(50) NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -- -------------------------------------------------------- -- -- Table structure for table `tbl_trip_details` -- CREATE TABLE IF NOT EXISTS `tbl_trip_details` ( `trip_id` bigint(20) NOT NULL AUTO_INCREMENT, `res_id` bigint(20) NOT NULL, `begin_mileage` varchar(7) COLLATE latin1_general_ci NOT NULL, `end_mileage` varchar(7) COLLATE latin1_general_ci NOT NULL, `end_gas_percent` varchar(4) COLLATE latin1_general_ci NOT NULL, `problem` tinyint(1) NOT NULL, `desc_problem` text COLLATE latin1_general_ci NOT NULL, `reg_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `mile_charges` double NOT NULL, `user_id` int(11) DEFAULT NULL, PRIMARY KEY (`trip_id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci AUTO_INCREMENT=13155 ; -- -------------------------------------------------------- -- -- Table structure for table `tbl_user` -- CREATE TABLE IF NOT EXISTS `tbl_user` ( `user_id` int(11) NOT NULL AUTO_INCREMENT, `f_name` varchar(20) COLLATE latin1_general_ci NOT NULL, `l_name` varchar(20) COLLATE latin1_general_ci NOT NULL, `dept_id` varchar(4) COLLATE latin1_general_ci NOT NULL, `phone` varchar(25) COLLATE latin1_general_ci NOT NULL, `birth_date` date NOT NULL, `license_no` varchar(20) COLLATE latin1_general_ci NOT NULL, `license_state` varchar(15) COLLATE latin1_general_ci NOT NULL, `license_expire` date NOT NULL, `email` varchar(150) COLLATE latin1_general_ci NOT NULL, `password` varchar(255) COLLATE latin1_general_ci DEFAULT NULL, `drive_tested` varchar(30) COLLATE latin1_general_ci NOT NULL, `test_date` date NOT NULL, `end_permit` date NOT NULL, `home_st_country` varchar(30) COLLATE latin1_general_ci NOT NULL, `active` tinyint(1) NOT NULL DEFAULT '0', `status_date` datetime DEFAULT NULL, `user_group` tinyint(4) NOT NULL, `user_type` varchar(20) COLLATE latin1_general_ci NOT NULL, `photo` varchar(255) COLLATE latin1_general_ci NOT NULL, `photo_link` varchar(255) COLLATE latin1_general_ci NOT NULL, `comment` varchar(300) COLLATE latin1_general_ci NOT NULL, `reg_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `permit_type` varchar(5) COLLATE latin1_general_ci NOT NULL DEFAULT 'First', `renew_date` date DEFAULT NULL, `renew_text` varchar(200) COLLATE latin1_general_ci DEFAULT NULL, `new_user` tinyint(1) NOT NULL DEFAULT '0', `driver_permission` tinyint(1) NOT NULL DEFAULT '0', `license_country` varchar(60) COLLATE latin1_general_ci NOT NULL, `max_passengers` int(11) NOT NULL DEFAULT '15', PRIMARY KEY (`user_id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci AUTO_INCREMENT=1695 ; -- -------------------------------------------------------- -- -- Table structure for table `tbl_user_comments` -- CREATE TABLE IF NOT EXISTS `tbl_user_comments` ( `id` int(11) NOT NULL AUTO_INCREMENT, `posting_user_id` int(11) NOT NULL, `about_user_id` int(11) NOT NULL, `comments_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `comments` text NOT NULL, `trip_id` bigint(20) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=248 ; -- -------------------------------------------------------- -- -- Table structure for table `tbl_user_group` -- CREATE TABLE IF NOT EXISTS `tbl_user_group` ( `group_id` tinyint(4) NOT NULL AUTO_INCREMENT, `group_name` varchar(50) COLLATE latin1_general_ci NOT NULL, PRIMARY KEY (`group_id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci AUTO_INCREMENT=7 ; -- -------------------------------------------------------- -- -- Table structure for table `tbl_vehicles` -- CREATE TABLE IF NOT EXISTS `tbl_vehicles` ( `vehicle_id` int(11) NOT NULL AUTO_INCREMENT, `user_id` int(11) NOT NULL, `vehicle_no` varchar(12) COLLATE latin1_general_ci NOT NULL, `vin_no` varchar(20) COLLATE latin1_general_ci NOT NULL, `oil_filter` varchar(20) COLLATE latin1_general_ci NOT NULL, `safety_date` date NOT NULL, `registration_date` date NOT NULL, `lic_plate_no` varchar(50) COLLATE latin1_general_ci NOT NULL, `make_id` tinyint(4) NOT NULL, `model` tinyint(4) NOT NULL, `year_manuf` char(4) COLLATE latin1_general_ci NOT NULL, `mileage_un` varchar(7) COLLATE latin1_general_ci NOT NULL, `date_to_un` date NOT NULL, `cost_to_un` double NOT NULL, `cost_rate` double NOT NULL, `passenger_cap` varchar(2) COLLATE latin1_general_ci NOT NULL, `condition_tech` varchar(50) COLLATE latin1_general_ci NOT NULL, `restriction` varchar(150) COLLATE latin1_general_ci NOT NULL, `issues` varchar(255) COLLATE latin1_general_ci NOT NULL, `active` tinyint(1) NOT NULL, `restricted` tinyint(1) NOT NULL, `date_revised` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `sold` tinyint(1) NOT NULL DEFAULT '0', `sold_date` date DEFAULT NULL, `admin_issues` text COLLATE latin1_general_ci NOT NULL, PRIMARY KEY (`vehicle_id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci AUTO_INCREMENT=95 ; -- -------------------------------------------------------- -- -- Table structure for table `tbl_vehicle_brand` -- CREATE TABLE IF NOT EXISTS `tbl_vehicle_brand` ( `brand_id` tinyint(4) NOT NULL AUTO_INCREMENT, `brand_name` varchar(255) COLLATE latin1_general_ci NOT NULL, PRIMARY KEY (`brand_id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci AUTO_INCREMENT=6 ; -- -------------------------------------------------------- -- -- Table structure for table `tbl_vehicle_comments` -- CREATE TABLE IF NOT EXISTS `tbl_vehicle_comments` ( `id` int(11) NOT NULL AUTO_INCREMENT, `posting_user_id` int(11) NOT NULL, `vehicle_id` int(11) NOT NULL, `comment_date` int(11) NOT NULL, `comment_type` varchar(25) NOT NULL, `comments` varchar(300) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table `tbl_vehicle_type` -- CREATE TABLE IF NOT EXISTS `tbl_vehicle_type` ( `v_type_id` tinyint(4) NOT NULL AUTO_INCREMENT, `v_type` varchar(255) COLLATE latin1_general_ci NOT NULL, `capacity` tinyint(4) NOT NULL, PRIMARY KEY (`v_type_id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci AUTO_INCREMENT=8 ; -- -------------------------------------------------------- -- -- Table structure for table `tbl_work_type` -- CREATE TABLE IF NOT EXISTS `tbl_work_type` ( `work_type_id` tinyint(4) NOT NULL AUTO_INCREMENT, `work_type` varchar(255) COLLATE latin1_general_ci NOT NULL, PRIMARY KEY (`work_type_id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci AUTO_INCREMENT=13 ; -- -------------------------------------------------------- -- -- Stand-in structure for view `VW_DELETABLE_USER_LIST` -- CREATE TABLE IF NOT EXISTS `VW_DELETABLE_USER_LIST` ( `user_id` int(11) ,`f_name` varchar(20) ,`l_name` varchar(20) ,`dept_name` varchar(50) ,`group_name` varchar(50) ,`reg_date` timestamp ,`res_id` bigint(20) ,`res_reg_date` timestamp ); -- -------------------------------------------------------- -- -- Stand-in structure for view `VW_DELETABLE_USER_LIST_SUB` -- CREATE TABLE IF NOT EXISTS `VW_DELETABLE_USER_LIST_SUB` ( `user_id` int(11) ,`res_id` bigint(20) ,`reg_date` timestamp ); -- -------------------------------------------------------- -- -- Structure for view `VW_DELETABLE_USER_LIST` -- DROP TABLE IF EXISTS `VW_DELETABLE_USER_LIST`; -- in use(#1142 - SHOW VIEW command denied to user 'transport'@'localhost' for table 'VW_DELETABLE_USER_LIST') -- -------------------------------------------------------- -- -- Structure for view `VW_DELETABLE_USER_LIST_SUB` -- DROP TABLE IF EXISTS `VW_DELETABLE_USER_LIST_SUB`; -- in use(#1142 - SHOW VIEW command denied to user 'transport'@'localhost' for table 'VW_DELETABLE_USER_LIST_SUB') /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; </code></pre> <p>Code to process the log in goes as:</p> <pre><code> if(isset($_POST["action"]) &amp;&amp; $_POST["action"]=="login"){ $sUserName = $_POST["txtemail"]; $sPassword = $_POST["txtpassword"]; $iGROUP = $_POST["drpusergroup"]; if(isset($_POST["drpleaderdepts"]) &amp;&amp; $_POST["drpleaderdepts"]!="") $iDEPT_ID = $_POST["drpleaderdepts"]; //$sLoginSQL = "select user_id, email, user_group from tbl_user where email = '".$sUserName."' and password = '".$sPassword."' and user_group = ".$iGROUP." and active = 1"; //if($iGROUP==$iGROUP_DRIVER || $iGROUP==$iGROUP_COORDINATOR_STAFF){ $sLoginSQL = "SELECT user_id FROM tbl_user WHERE email = '".$sUserName."' AND BINARY password = '".$sPassword."' AND user_group = ".$iGROUP; $iRsLogin = mysql_query($sLoginSQL) or die(mysql_error()); if (mysql_num_rows($iRsLogin)&lt;=0){ $sMessage = fn_Print_MSG_BOX("&lt;li&gt;Error!!! invalid login information, please try again.", "C_ERROR"); $bDRIVER_ERR_TITLE = "Invalid Information!"; $bDRIVER_ERR_MSG = "Your username or password is invalid, please try again."; $bDRIVER_INACTIVE_ERR = true; }else{ list($iUSER_ID) = mysql_fetch_row($iRsLogin); $sSQL = "SELECT active, new_user FROM tbl_user WHERE user_id = ".$iUSER_ID; $rsDRIVER = mysql_query($sSQL) or die(mysql_error()); if(mysql_num_rows($rsDRIVER)&gt;0){ list($bACTIIVE, $bNEW_DRIVER) = mysql_fetch_row($rsDRIVER); if($bACTIIVE==0 &amp;&amp; $bNEW_DRIVER==1){ //DRIVER IS new $bDRIVER_ERR_TITLE = "Not an approved account!"; $bDRIVER_ERR_MSG = "You are not yet been approved from Administration, please contact to Transportation Office"; $bDRIVER_INACTIVE_ERR = true; $sMessage = fn_Print_MSG_BOX("&lt;li&gt;Error!!! You are not yet been approved from Administration, please contact to Transportation Office", "C_ERROR"); }elseif($bACTIIVE==0 &amp;&amp; $bNEW_DRIVER==0){ //DRIVER is inactive $bDRIVER_ERR_TITLE = "Inactive Account!"; if($iGROUP==$iGROUP_DRIVER || $iGROUP==$iGROUP_COORDINATOR_STAFF){ $bDRIVER_ERR_MSG = "Your account has been suspended...&lt;br /&gt;you may need to change your home department..&lt;br /&gt;contact transportation Office for more information"; $sMessage = fn_Print_MSG_BOX("&lt;li&gt;Error!!! Your account has been suspended...you may need to change your home department..&lt;br /&gt;contact transportation Office for more information", "C_ERROR"); }else{ $bDRIVER_ERR_MSG = "Your account has been suspended...&lt;br /&gt;contact administration for more information"; $sMessage = fn_Print_MSG_BOX("&lt;li&gt;Error!!! Your account has been suspended...&lt;br /&gt;contact administration for more information", "C_ERROR"); } $bDRIVER_INACTIVE_ERR = true; }elseif($bACTIIVE==1 &amp;&amp; $bNEW_DRIVER==0){ $_SESSION["User_ID"] = $iUSER_ID; $_SESSION["User_Name"] = $sUserName; $_SESSION["User_Group"] = $iGROUP; $sIP_ADDRESS = getRealIpAddr(); //print("DATE==".date('Y-m-d H:i:s')); //die(); $sSQL = "INSERT INTO tbl_log (user_id, login_datetime, ip_address) VALUES (".$_SESSION["User_ID"].", '".date('Y-m-d H:i:s')."', '".$sIP_ADDRESS."')"; $rsLOG = mysql_query($sSQL) or die(mysql_error()); if($iGROUP==$iGROUP_DRIVER || $iGROUP==$iGROUP_COORDINATOR_STAFF){ $_SESSION["load_counter"] = "1"; echo "&lt;SCRIPT LANGUAGE='JAVASCRIPT'&gt; window.location='reservations.php'&lt;/SCRIPT&gt;"; }elseif($iGROUP==$iGROUP_TM){ echo "&lt;SCRIPT LANGUAGE='JAVASCRIPT'&gt; window.location='management.php'&lt;/SCRIPT&gt;"; }elseif($iGROUP==$iGROUP_TC){ echo "&lt;SCRIPT LANGUAGE='JAVASCRIPT'&gt; window.location='admin.php'&lt;/SCRIPT&gt;"; }elseif($iGROUP==$iGROUP_SERVICETCH){ echo "&lt;SCRIPT LANGUAGE='JAVASCRIPT'&gt; window.location='shopwork.php'&lt;/SCRIPT&gt;"; } } } } } </code></pre> </div>

关于网站前端页面访问MYSQL数据库的数据

我有一个前端页面,但是我想通过前端页面来访问MYSQL数据库,我该从哪方面入手呢?谢谢!

Mysql数据库 - 将文件导入新数据库

<div class="post-text" itemprop="text"> <p>When I want to move my database to new server, I get this error.</p> <blockquote> <p>SQL: #1067 - Invalid default value for 'jailtime' </p> </blockquote> <p>Jailtime: Datetime, Current_Timestamp.</p> <p>Any ideas how can I fix this? As I can remember, I created a SQL which if pJailed row gets modified, Jailtime row gets Current_Timetsamp.</p> <p>server 5.5.49 - MySQL Community Server (GPL) by Remi phpmyadmin: 4.0.10.20</p> <p>Can I provide any details in plus to help you to help me? Thanks.</p> <p>Later Edit: I read multiple stackoverflow questions about related, found answers like NO_ZERO_DATE., but when I tried to find </p> <pre><code>show variables like 'sql_mode' ; </code></pre> <p>I don't have the sql mode <code>"NO_ZERO_IN_DATE,NO_ZERO_DATE</code></p> <p>Tried even the</p> <pre><code>SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='TRADITIONAL,ALLOW_INVALID_DATES'; </code></pre> <p>My triggers</p> <pre><code>CREATE TRIGGER `logsupdate` BEFORE UPDATE ON `users` FOR EACH ROW begin if new.pJailed &lt;&gt; old.pJailed then set new.jailtime = now(); end if; if new.pVIP &lt;&gt; old.pVIP then set new.viplog = now(); end if; if new.pAdminLevel &lt;&gt; old.pAdminLevel then set new.adminlog = now(); end if; if new.pPoints &lt;&gt; old.pPoints then set new.TM4 = now(); end if; end </code></pre> </div>

phpMyAdmin正在查找错误的数据库中的PMA_Tracking等

<div class="post-text" itemprop="text"> <p>I recently did something stupid and then compounded it with another idiot move and now I am stuck.</p> <p>I allowed phpMyAdmin to create it's tables in an important DB I was working on. Of course being a fool I panicked and dropped the tables. Now despite having a vanilla config file that makes no mention of the DB and having removed all the phpMyAdmin files and unpacked them again I am still getting error messages about the table not existing in the wrong DB.</p> <p>As per <a href="https://stackoverflow.com/questions/12760394/1146-table-phpmyadmin-pma-recent-doesnt-exist">#1146 - Table 'phpmyadmin.pma_recent' doesn't exist</a> I have imported the make tables SQL but this has not helped.</p> <p>I cannot, for the life of me, figure out what phpMyAdmin has written and where to make this problem so persistent but I am starting to loose my cool...</p> <p>How do I make it look in the right place? I've updated the <code>config.inc.php</code> and outright told it that where to look and still it wants to use the DB I am trying to build for my project.</p> <pre><code> /* Advanced phpMyAdmin features */ $cfg['Servers'][$i]['pmadb'] = 'phpmyadmin'; $cfg['Servers'][$i]['bookmarktable'] = 'pma_bookmark'; $cfg['Servers'][$i]['relation'] = 'pma_relation'; $cfg['Servers'][$i]['table_info'] = 'pma_table_info'; $cfg['Servers'][$i]['table_coords'] = 'pma_table_coords'; $cfg['Servers'][$i]['pdf_pages'] = 'pma_pdf_pages'; $cfg['Servers'][$i]['column_info'] = 'pma_column_info'; $cfg['Servers'][$i]['history'] = 'pma_history'; $cfg['Servers'][$i]['designer_coords'] = 'pma_designer_coords'; $cfg['Servers'][$i]['tracking'] = 'pma_tracking'; $cfg['Servers'][$i]['userconfig'] = 'pma_userconfig'; $cfg['Servers'][$i]['recent'] = 'pma_recent'; $cfg['Servers'][$i]['table_uiprefs'] = 'pma_table_uiprefs'; </code></pre> <p>What am I missing to make it want to look in <code>MyOtherDB</code>?</p> </div>

navicat for mysql导入txt文本出现数据库条数和文本条数不一致

将![图片说明](https://img-ask.csdn.net/upload/201808/22/1534943475_20426.jpg)txt文本导入数据库,过程并没有报错,到时和文本的行数不一致, 文本大概有千万条,数据库只有几百万条,这是什么原因? 麻烦讲一下,谢谢。尽量详细些。

php导入larg表到phpmyadmin数据库

<div class="post-text" itemprop="text"> <p>I dropped one of the tables from the database accidentally. fortunately, I have back-up. (I have used the "Auto backup for mysql")</p> <p>The back-up of the table is stored as .txt file (56 Megabytes) on my PC. </p> <p>I tried to import it by PhpMyAdmin and the import failed because the file is too large to import. </p> <p>then I uploaded the file to /home/tablebk directory. I have some experiences in php. I know that I would import it with this code, but i don't know the sql statment for this import.</p> <p><strong>what is have to put as <code>$line</code> variable?</strong></p> <p><strong>please help me :( :(</strong></p> <pre><code>&lt;?php $dbhost = 'localhost'; $dbuser = 'mysite'; $dbpw = 'password'; $dbname = 'databasename'; $file = @fopen('country.txt', 'r'); if ($file) { while (!feof($file)) { $line = trim(fgets($file)); $flag = mysql_query($line); if (isset($flag)) { echo 'Insert Successfully&lt;br /&gt;'; } else { echo mysql_error() . '&lt;br/&gt;'; } flush(); } fclose($file); } echo '&lt;br /&gt;End of File'; ?&gt; </code></pre> </div>

数据库不知道为什么意外丢失?

买了个腾讯云服务器,在Linux系统上安装了mysql数据库,想安装wordpress来搭网站。 * 接着奇怪的事情就发生了,原来已经给wordpress配置好了数据库,正在自定义网站的时候,突然就出现了“Error establishing a database connection”的错误提示 * 通过phpMyAdmin查看数据库才知道,原来之前建好的wordpress数据库竟然莫名其妙地丢失了,只保留了初始化的那几个数据库,之前弄好了网站样式都没有了,bu'de'bu重新安装一遍wordpress了。 请问一下大佬们,为什么会突然丢失数据库?而且问题一直在开发中存在。怎么解决数据库无缘无故丢失的问题。毕竟phpMyAdmin不支持自动备份数据库,而且数据库老是丢失都要手动导入数据库也很麻烦啊!!!

无法使用XAMPP连接到MySQL数据库

<div class="post-text" itemprop="text"> <p>I am new to programming and I have been trying to run a PHP application from Murachs PHP and MySQL instructional book, the source code is actually from their website, but have been getting an error message. The error message is as follows; </p> <p>"Database Error There was an error connecting to the database. The database must be installed as described in the appendix. MySQL must be running as described in chapter 1. Error message: SQLSTATE[HY000] [1045] Access denied for user 'mgs_user'@'localhost' (using password: YES)"</p> <p>I downloaded XAMPP and it is running fine but for some reason I am unable to use the MySQL database. I have searched and Googled and searched some more for the last two days but I can't seem to find a solution. </p> <p>I remember setting up a username and password during installation and I set up a username called "root" and a password through PHPMyAdmin yesterday but why will this application not run?</p> <p>Any help is appreciated.</p> <p>Update #1</p> <p>Here are samples of the code that creates the database, the user and the password.</p> <p>This is downloaded from Murach's site so the code should be good. I am thinking there is something wrong with the XAMPP/MySQL that will not allow a connection to the database.</p> <pre><code>/***************************************** * Create the my_guitar_shop1 database *****************************************/ DROP DATABASE IF EXISTS my_guitar_shop1; CREATE DATABASE my_guitar_shop1; USE my_guitar_shop1; -- MySQL command -- Create a user named mgs_user GRANT SELECT, INSERT, UPDATE, DELETE ON * TO mgs_user@localhost IDENTIFIED BY 'pa55word'; </code></pre> <p>Update #2</p> <p>I created the user "mgs_user@localhost" in PHPMyAdmin and gave it permissions and now I get the following error;</p> <p>"Database Error There was an error connecting to the database.</p> <p>The database must be installed as described in the appendix.</p> <p>MySQL must be running as described in chapter 1.</p> <p>Error message: SQLSTATE[HY000] [1049] Unknown database 'my_guitar_shop1' "</p> <p>The code seems to be correct but it is not creating users or databases in MySQL. </p> <p>Update #3</p> <p>Created the database "my_guitar_shop1" through PHPMyAdmin and now I get these errors with corresponding code just below each error message;</p> <p>( ! ) Notice: Undefined index: category_id in C:\xampp\htdocs\book_apps\ch05_guitar_shop\product_manager\index.php on line 16</p> <pre><code>if ($action == 'list_products') { // Get the current category ID $category_id = $_GET['category_id']; &lt;-----this is line #16 if (!isset($category_id)) { $category_id = 1; } </code></pre> <p>( ! ) Fatal error: Call to a member function fetch() on a non-object in C:\xampp\htdocs\book_apps\ch05_guitar_shop\model\category_db.php on line 15</p> <pre><code>function get_category_name($category_id) { global $db; $query = "SELECT * FROM categories WHERE categoryID = $category_id"; $category = $db-&gt;query($query); $category = $category-&gt;fetch(); &lt;-----this is line #15 $category_name = $category['categoryName']; return $category_name; } </code></pre> </div>

phpMyAdmin - 尝试导入文件时重置连接

<div class="post-text" itemprop="text"> <p>I am new to using PHP My Admin, i have read answers for this question before but i dont understand them and need a more in depth, simpler explanation.</p> <p>I backed up my wordpress website, then moved host. So now my website is back to square 1 and i need to use my backup to get everything back. I read that to do this, i need to go onto my cpanel&gt;phpmyadmin, then select database&gt;my database&gt;import. I selected the zipped file of my backup and imported it, but it then says 'connection reset' and doesnt do anything. After research it seems like a lot of people have this problem! The zip file is 654,613kb. What do i do? Thanks</p> </div>

mysql数据库中一个字段的数据 受另外另外一个表字段的影响 用触发器应该怎么实现呢??

mysql数据库中一个字段的数据 受另外另外一个表字段的影响 用触发器应该怎么实现呢??

phpmyadmin服务器pb导入数据库

<div class="post-text" itemprop="text"> <p>I made a website on localhost using Wordpress on the Wamp server. Locally the website works fine but every time I try to upload the database on <em>1and1</em> hosting or on <em>godadddy</em> hosting I get the same error <code>1044 did not grant user privilege</code>. How do I fix this issue? </p> <p>I'm using root as the user locally .I tried to upload db on server and granted privilege to user@%. Saw the same post but no answer</p> </div>

尝试导入sql文件,但面临此错误

<div class="post-text" itemprop="text"> <p>This is the error on cmd prompt: <br><code>C:\xampp\mysql\bin&gt;mysql -p -u root --default_character_set utf8 recipes &lt; recipes.sql</code> <br> Enter password: ****<br></p> <pre><code>ERROR 1064 (42000) at line 20: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '"admin" ( "admin_id" int(10) NOT NULL, "f_name" text NOT NULL, "l_name" te' at line 1 </code></pre> <p>This is the error when I try to import on phpmyadmin `Error Static analysis:</p> <p>4 errors were found during analysis.</p> <pre><code>A symbol name was expected! (near ""admin_id"" at position 383) At least one column definition was expected. (near ""admin_id"" at position 383) Unexpected beginning of statement. (near "20" at position 398) Unrecognized statement type. (near "NOT NULL" at position 402) SQL query: -- phpMyAdmin SQL Dump -- version 4.8.3. -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: August 29, 2018 at 09:56 AM -- Server version: 5.1.37 -- PHP Version: 7.2.9 -- -- Database: `recipes` -- -- -------------------------------------------------------- -- -- Table structure for table `admin` -- CREATE TABLE IF NOT EXISTS "admin" ( "admin_id" int(20) NOT NULL, "f_name" text NOT NULL, "l_name" text NOT NULL, "email" varchar(250) NOT NULL, "c_email" varchar(250) NOT NULL, "pass" varchar(250) NOT NULL, "c_pass" varchar(250) NOT NULL, "u_name" varchar(150) NOT NULL, "address" text NOT NULL, "date_of_birth" varchar(50) NOT NULL, "city" text NOT NULL, "state" text NOT NULL, "country" text NOT NULL, "gender" text NOT NULL, "p_o" int(50) NOT NULL, PRIMARY KEY ("admin_id") ) AUTO_INCREMENT=1 </code></pre> <p>MySQL said: Documentation</p> <h1>1064 - You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '"admin" (</h1> <p>"admin_id" int(20) NOT NULL, "f_name" text NOT NULL, "l_name"' at line 20<a href="https://i.stack.imgur.com/RkcLQ.png" rel="nofollow noreferrer">this is my code</a>`</p> </div>

mysql怎么导出线上数据库

使用phpmyadmin,导出以后再通过本地工具导入失败;使用cmd命令source导入也失败,好尴尬

将Frm文件复制到PHPmyadmin

在wampserver的集成环境下,我将一个数据库文件夹XK(里面有3个FRM文件)复制到wamp\bin\mysql\data下,打开PHPMYADMIN,可以看到XK数据库,但是点开它显示里面没有表,但是能看到xk数据库下有三个表,点击表出现一行文字,看不懂,可能是罗马文还是瑞典文。急急急!怎么解决,马上就要考试了,操作却老出问题

学Python后到底能干什么?网友:我太难了

感觉全世界营销文都在推Python,但是找不到工作的话,又有哪个机构会站出来给我推荐工作? 笔者冷静分析多方数据,想跟大家说:关于超越老牌霸主Java,过去几年间Python一直都被寄予厚望。但是事实是虽然上升趋势,但是国内环境下,一时间是无法马上就超越Java的,也可以换句话说:超越Java只是时间问题罢。 太嚣张了会Python的人!找工作拿高薪这么简单? https://edu....

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

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

为什么程序猿都不愿意去外包?

分享外包的组织架构,盈利模式,亲身经历,以及根据一些外包朋友的反馈,写了这篇文章 ,希望对正在找工作的老铁有所帮助

Java校招入职华为,半年后我跑路了

何来 我,一个双非本科弟弟,有幸在 19 届的秋招中得到前东家华为(以下简称 hw)的赏识,当时秋招签订就业协议,说是入了某 java bg,之后一系列组织架构调整原因等等让人无法理解的神操作,最终毕业前夕,被通知调往其他 bg 做嵌入式开发(纯 C 语言)。 由于已至于校招末尾,之前拿到的其他 offer 又无法再收回,一时感到无力回天,只得默默接受。 毕业后,直接入职开始了嵌入式苦旅,由于从未...

Java基础知识面试题(2020最新版)

文章目录Java概述何为编程什么是Javajdk1.5之后的三大版本JVM、JRE和JDK的关系什么是跨平台性?原理是什么Java语言有哪些特点什么是字节码?采用字节码的最大好处是什么什么是Java程序的主类?应用程序和小程序的主类有何不同?Java应用程序与小程序之间有那些差别?Java和C++的区别Oracle JDK 和 OpenJDK 的对比基础语法数据类型Java有哪些数据类型switc...

@程序员:GitHub这个项目快薅羊毛

今天下午在朋友圈看到很多人都在发github的羊毛,一时没明白是怎么回事。 后来上百度搜索了一下,原来真有这回事,毕竟资源主义的羊毛不少啊,1000刀刷爆了朋友圈!不知道你们的朋友圈有没有看到类似的消息。 这到底是啥情况? 微软开发者平台GitHub 的一个区块链项目 Handshake ,搞了一个招募新会员的活动,面向GitHub 上前 25万名开发者派送 4,246.99 HNS币,大约价...

用python打开电脑摄像头,并把图像传回qq邮箱【Pyinstaller打包】

前言: 如何悄悄的打开朋友的摄像头,看看她最近过的怎么样,嘿嘿!这次让我带你们来实现这个功能。 注: 这个程序仅限在朋友之间开玩笑,别去搞什么违法的事情哦。 代码 发送邮件 使用python内置的email模块即可完成。导入相应的代码封装为一个send函数,顺便导入需要导入的包 注: 下面的代码有三处要修改的地方,两处写的qq邮箱地址,还有一处写的qq邮箱授权码,不知道qq邮箱授权码的可以去百度一...

做了5年运维,靠着这份监控知识体系,我从3K变成了40K

从来没讲过运维,因为我觉得运维这种东西不需要太多的知识面,然后我一个做了运维朋友告诉我大错特错,他就是从3K的运维一步步到40K的,甚至笑着说:我现在感觉自己什么都能做。 既然讲,就讲最重要的吧。 监控是整个运维乃至整个产品生命周期中最重要的一环,事前及时预警发现故障,事后提供详实的数据用于追查定位问题。目前业界有很多不错的开源产品可供选择。选择一款开源的监控系统,是一个省时省力、效率最高的方...

C++(继承):19---虚基类与虚继承(virtual)

一、菱形继承 在介绍虚继承之前介绍一下菱形继承 概念:A作为基类,B和C都继承与A。最后一个类D又继承于B和C,这样形式的继承称为菱形继承 菱形继承的缺点: 数据冗余:在D中会保存两份A的内容 访问不明确(二义性):因为D不知道是以B为中介去访问A还是以C为中介去访问A,因此在访问某些成员的时候会发生二义性 缺点的解决: 数据冗余:通过下面“虚继承”技术来解决(见下) 访问...

再不跳槽,应届毕业生拿的都比我多了!

跳槽几乎是每个人职业生涯的一部分,很多HR说“三年两跳”已经是一个跳槽频繁与否的阈值了,可为什么市面上有很多程序员不到一年就跳槽呢?他们不担心影响履历吗? PayScale之前发布的**《员工最短任期公司排行榜》中,两家码农大厂Amazon和Google**,以1年和1.1年的员工任期中位数分列第二、第四名。 PayScale:员工最短任期公司排行榜 意外的是,任期中位数极小的这两家公司,薪资...

我以为我学懂了数据结构,直到看了这个导图才发现,我错了

数据结构与算法思维导图

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

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

华为初面+综合面试(Java技术面)附上面试题

华为面试整体流程大致分为笔试,性格测试,面试,综合面试,回学校等结果。笔试来说,华为的难度较中等,选择题难度和网易腾讯差不多。最后的代码题,相比下来就简单很多,一共3道题目,前2题很容易就AC,题目已经记不太清楚,不过难度确实不大。最后一题最后提交的代码过了75%的样例,一直没有发现剩下的25%可能存在什么坑。 笔试部分太久远,我就不怎么回忆了。直接将面试。 面试 如果说腾讯的面试是挥金如土...

和黑客斗争的 6 天!

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

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

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

win10暴力查看wifi密码

刚才邻居打了个电话说:喂小灰,你家wifi的密码是多少,我怎么连不上了。 我。。。 我也忘了哎,就找到了一个好办法,分享给大家: 第一种情况:已经连接上的wifi,怎么知道密码? 打开:控制面板\网络和 Internet\网络连接 然后右击wifi连接的无线网卡,选择状态 然后像下图一样: 第二种情况:前提是我不知道啊,但是我以前知道密码。 此时可以利用dos命令了 1、利用netsh wlan...

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

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

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

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

总结了 150 余个神奇网站,你不来瞅瞅吗?

原博客再更新,可能就没了,之后将持续更新本篇博客。

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

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

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

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

女朋友过生日,我花了20分钟给她写了一个代理服务器

女朋友说:“看你最近挺辛苦的,我送你一个礼物吧。你看看想要什么,我来准备。” 我想了半天,从书到鞋子到电子产品最后到生活用品,感觉自己什么都不缺,然后和她说:“你省省钱吧,我什么都不需要。” 她坚持要送:“不行,你一定要说一个礼物,我想送你东西了。” 于是,我认真了起来,拿起手机,上淘宝逛了几分钟,但还是没能想出来缺点什么,最后实在没办法了:“这样吧,如果你实在想送东西,那你就写一个代理服务器吧”...

记一次腾讯面试,我挂在了最熟悉不过的队列上……

腾讯后台面试,面试官问:如何自己实现队列?

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

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

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

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

程序员写出这样的代码,能不挨骂吗?

当你换槽填坑时,面对一个新的环境。能够快速熟练,上手实现业务需求是关键。但是,哪些因素会影响你快速上手呢?是原有代码写的不够好?还是注释写的不够好?昨夜...

带了6个月的徒弟当了面试官,而身为高级工程师的我天天修Bug......

即将毕业的应届毕业生一枚,现在只拿到了两家offer,但最近听到一些消息,其中一个offer,我这个组据说客户很少,很有可能整组被裁掉。 想问大家: 如果我刚入职这个组就被裁了怎么办呢? 大家都是什么时候知道自己要被裁了的? 面试软技能指导: BQ/Project/Resume 试听内容: 除了刷题,还有哪些技能是拿到offer不可或缺的要素 如何提升面试软实力:简历, 行为面试,沟通能...

!大部分程序员只会写3年代码

如果世界上都是这种不思进取的软件公司,那别说大部分程序员只会写 3 年代码,恐怕就没有程序员这种职业。

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

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

2020阿里全球数学大赛:3万名高手、4道题、2天2夜未交卷

阿里巴巴全球数学竞赛( Alibaba Global Mathematics Competition)由马云发起,由中国科学技术协会、阿里巴巴基金会、阿里巴巴达摩院共同举办。大赛不设报名门槛,全世界爱好数学的人都可参与,不论是否出身数学专业、是否投身数学研究。 2020年阿里巴巴达摩院邀请北京大学、剑桥大学、浙江大学等高校的顶尖数学教师组建了出题组。中科院院士、美国艺术与科学院院士、北京国际数学...

立即提问
相关内容推荐