MySQL大内存配置方案 如my-medium.ini、my-huge.ini等
MySql noinstall-5.1.xx-win32 配置(原创) 1、解压mysql-noinstall-5.1.xx-win32.zip 到你喜欢的目录,例如:d:\php\mysql 2、在根目录d:\php\mysql中有五个配置信息文件: my-small.ini (内存 = 64M) my-medium.ini (内存 128M ) my-large.ini (内存
MySql noinstall-5.1.xx-win32 配置(原创)
1、解压mysql-noinstall-5.1.xx-win32.zip 到你喜欢的目录,例如:d:\php\mysql
2、在根目录d:\php\mysql中有五个配置信息文件:
my-small.ini (内存
my-medium.ini (内存 128M )
my-large.ini (内存 512M)
my-huge.ini (内存 1G-2G)
my-innodb-heavy-4G.ini (内存 4GB)
假设我的内存是1G的,我选择了my-huge.ini,选择其中一个适合你自己机子的配置文件。
3、编辑my.ini,在[mysqld]的“port=3306”下面增加如下两句:
注意,在Windows中路径名中使用斜杠“/”而不是反斜杠“\”。 如果使用反斜杠“\”,那么必须双写它们“\\”。
# 安装目录的路径 # 设置mysql数据库的数据的存放目录,必须是data,或者是\\xxx\data
basedir="E:/by8/MySQL/"
# 设置mysql数据库的数据的存放目录
datadir="F:/by8/MySQL/Data/"
# 设置mysql服务器的字符集
default-character-set = utf8
# 默认的存储引擎
default-storage-engine = MYISAM
移动“E:\by8\mysql\data”目录到“F:\by8\MySQL\Data”。
在[mysql]下面新增:
default-character-set = utf8
修改以下几句为:
max_allowed_packet = 32M (默认为1M)
sort_buffer_size = 4M (MySQL 5.0.15 my-medium.ini默认为512K)
max_allowed_packet 参数说明:
参数的作用是,用来控制其通信缓冲区的最大长度。
sort_buffer_size 参数说明:
查询排序时所能使用的缓冲区大小。
注意:该参数对应的分配内存是每连接独占!
如果有100个连接,那么实际分配的总共排序缓冲区大小为100 × 6 = 600MB。
所以,对于内存在4GB左右的服务器推荐设置为6-8M。
4、安装服务:
"E:\by8\mysql\bin\mysqld" --install Mysql --defaults-file="E:\by8\Mysql\my.ini"
5、启动服务:
net start mysql
这样mysql就安装好了。你任务管理器当中可以看到mysqld-nt.exe这个进程。说明您的mysql已经安装好了。并成功的启动了。
6、为匿名用户设置密码:
%myd_dir%\bin\mysqladmin.exe -uroot -ptoor password "%my_newpwd%"
刚开始安装好的mysql登录密码是空密码:
C:\Documents and Settings\Administrator>e:
E:\>cd by8
E:\by8>cd mysql
E:\by8\Mysql>cd bin
E:\by8\Mysql\bin\>mysql -uroot -p
Enter password: //这里直接按回车(enter),不需要输入密码的。
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| test |
+--------------------+
3 rows in set (0.00 sec)
为了安全,我们这里修改下刚安装的mysql数据库的root用户的密码 。操作命令如下:
mysql> use mysql
Database changed
mysql> update user set password=password("123456") where user="root";
Query OK, 2 rows affected (0.03 sec)
Rows matched: 2 Changed: 2 Warnings: 0
mysql> exit //退出
就这样我把root的密码修改为了123456。
还有中修改密码的方法是利用msyqladmin这个命令
确认可以登录我们退出mysql
格式:mysqladmin -u用户名 -p旧密码 password 新密码
>exit
>mysqladmin -uroot -password 123456
//我们这里把mysql root的原来的空密码修改成123456,因为原来root没有密码,所以-p 就密码这项就可以省略了。
为了让大家印象更深刻些,我们这里再把已经修改过的密码1234560修改成为 123456
命令:mysqladmin -uroot -p123456 password 1234
PS:MYSQL记录用户名和密码的两张表为:
user.MYD和user.MYI,备份下他们,以后就不用为重装改密码麻烦了

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

For mechanical hard drives or SATA solid-state drives, you will feel the increase in software running speed. If it is an NVME hard drive, you may not feel it. 1. Import the registry into the desktop and create a new text document, copy and paste the following content, save it as 1.reg, then right-click to merge and restart the computer. WindowsRegistryEditorVersion5.00[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SessionManager\MemoryManagement]"DisablePagingExecutive"=d

According to news from this website on September 3, Korean media etnews reported yesterday (local time) that Samsung Electronics and SK Hynix’s “HBM-like” stacked structure mobile memory products will be commercialized after 2026. Sources said that the two Korean memory giants regard stacked mobile memory as an important source of future revenue and plan to expand "HBM-like memory" to smartphones, tablets and laptops to provide power for end-side AI. According to previous reports on this site, Samsung Electronics’ product is called LPWide I/O memory, and SK Hynix calls this technology VFO. The two companies have used roughly the same technical route, which is to combine fan-out packaging and vertical channels. Samsung Electronics’ LPWide I/O memory has a bit width of 512

According to news from this site on June 7, GEIL launched its latest DDR5 solution at the 2024 Taipei International Computer Show, and provided SO-DIMM, CUDIMM, CSODIMM, CAMM2 and LPCAMM2 versions to choose from. ▲Picture source: Wccftech As shown in the picture, the CAMM2/LPCAMM2 memory exhibited by Jinbang adopts a very compact design, can provide a maximum capacity of 128GB, and a speed of up to 8533MT/s. Some of these products can even be stable on the AMDAM5 platform Overclocked to 9000MT/s without any auxiliary cooling. According to reports, Jinbang’s 2024 Polaris RGBDDR5 series memory can provide up to 8400

Creating a MySQL table using PHP requires the following steps: Connect to the database. Create the database if it does not exist. Select a database. Create table. Execute the query. Close the connection.

One of the major changes introduced in MySQL 8.4 (the latest LTS release as of 2024) is that the "MySQL Native Password" plugin is no longer enabled by default. Further, MySQL 9.0 removes this plugin completely. This change affects PHP and other app

According to news from this website on July 23, the JEDEC Solid State Technology Association, the microelectronics standard setter, announced on the 22nd local time that the DDR5MRDIMM and LPDDR6CAMM memory technical specifications will be officially launched soon, and introduced the key details of these two memories. The "MR" in DDR5MRDIMM stands for MultiplexedRank, which means that the memory supports two or more Ranks and can combine and transmit multiple data signals on a single channel without additional physical The connection can effectively increase the bandwidth. JEDEC has planned multiple generations of DDR5MRDIMM memory, with the goal of eventually increasing its bandwidth to 12.8Gbps, compared with the current 6.4Gbps of DDR5RDIMM memory.

When the prices of ultra-high-frequency flagship memories such as 7600MT/s and 8000MT/s are generally high, Lexar has taken action. They have launched a new memory series called Ares Wings ARES RGB DDR5, with 7600 C36 and 8000 C38 is available in two specifications. The 16GB*2 sets are priced at 1,299 yuan and 1,499 yuan respectively, which is very cost-effective. This site has obtained the 8000 C38 version of Wings of War, and will bring you its unboxing pictures. The packaging of Lexar Wings ARES RGB DDR5 memory is well designed, using eye-catching black and red color schemes with colorful printing. There is an exclusive &quo in the upper left corner of the packaging.

According to news from this website on May 16, Longsys, the parent company of the Lexar brand, announced that it will demonstrate a new form of memory - FORESEELPCAMM2 at CFMS2024. FORESEELPCAMM2 is equipped with LPDDR5/5x particles, is compatible with 315ball and 496ball designs, supports frequencies of 7500MT/s and above, and has product capacity options of 16GB, 32GB, and 64GB. In terms of product technology, FORESEELPCAMM2 adopts a new design architecture to directly package 4 x32LPDDR5/5x memory particles on the compression connector, realizing a 128-bit memory bus on a single memory module, providing a more efficient packaging than standard memory modules.
