GVKun编程网logo

windows 下mysql 5.7.18的使用(mysql5.7 win10)

1

以上就是给各位分享windows下mysql5.7.18的使用,其中也会对mysql5.7win10进行解释,同时本文还将给你拓展C#windows窗体应用程序WordInterop适用于Window

以上就是给各位分享windows 下mysql 5.7.18的使用,其中也会对mysql5.7 win10进行解释,同时本文还将给你拓展C# windows 窗体应用程序 Word Interop 适用于 Windows 7 但不适用于 Windows 10、CentOS 7 下MySQL 5.7.12主从复制架构配置记录(亲自验证可行)、CentOS 下MySQL 5.1.45 二进制版本安装及多Apache php版本安装、Centos 下Mysql 表名区分大小名问题等相关知识,如果能碰巧解决你现在面临的问题,别忘了关注本站,现在开始吧!

本文目录一览:

windows 下mysql 5.7.18的使用(mysql5.7 win10)

windows 下mysql 5.7.18的使用(mysql5.7 win10)

  • 一、下载

网址: https://dev.mysql.com/downloads/windows/installer/5.7.html;

可以看到note32位和64位下载是一样的

  • 二、安装

双击下载的文件



安装页面

 

 
可以看三个需求都没满足,返回上一步

重新选择种类为costume ,next

将步骤五种的几个功能移除

Installation ,单击 Execute,耐心等待安装

安装完成 next

next

可以就默认,next
此处定义的 TCP/IP Port Number (即 3306) 将用于创建 Windows 防火墙的入站规则。

设置密码记住,添加用户




 如果你想自己的数据库可以作为服务器的远程数据库,下一个勾不选


单击 Execute,耐心等待安装

next

又回到这步

设置root密码 check

单击 Execute,耐心等待安装

安装完毕 next




安装完毕

  • 三、设置环境变量

MYSQL_HOME=D:\Program Files\MySQL\MySQL Server 5.7;

添加path=%MYSQL_HOME%\bin;

  • 四、测试 

dos命令下:

启动服务:net start MySQL57;

连接数据库:

mysql -uroot -p123123

 

C# windows 窗体应用程序 Word Interop 适用于 Windows 7 但不适用于 Windows 10

C# windows 窗体应用程序 Word Interop 适用于 Windows 7 但不适用于 Windows 10

如何解决C# windows 窗体应用程序 Word Interop 适用于 Windows 7 但不适用于 Windows 10

我编写了一个应用程序来帮助用户使用 C# 生成字母。我创建了以富文本格式保存在 sql Server 数据库中的模板。我的开发机器是 Windows 7,我使用 Visual Studio 2019 来编写应用程序。我使用 NuGet 添加 Word 的互操作引用。该应用程序配置为面向 x86 的 Release、平台 Active(Any cpu)。它是一个 ClickOnce 应用程序,从共享驱动器安装在一个单独的目录中,但与保存字母的驱动器相同。

该应用程序在我的机器上正常运行,但在 Windows 10 用户机器上运行不正常。当它尝试保存文件时,她收到一条错误消息,提示“抱歉,我们找不到该文件”。我们都有 Word 2016。两台机器都是 64 位。我将这封信保存为 Word 中的备份,然后导出为 PDF。在导出为 PDF 之前,代码无法保存 Word 文档。请参阅下面的代码片段:

  1. public static void SavetoWord2(string CoverLetter,string LetterText,string FileSave,string BackUpSave,ref string ErrorString)
  2. {
  3. try
  4. {
  5. Microsoft.Office.Interop.Word.Application oWord = new Microsoft.Office.Interop.Word.Application();
  6. string headerfooterFile = Properties.FileResources.headerfooterTemplate;
  7. Document odoc = new Document();
  8. odoc = oWord.Documents.Add(@headerfooterFile);
  9. odoc.Activate();
  10. try
  11. {
  12. Clipboard.Clear();
  13. Clipboard.SetText(CoverLetter,TextDataFormat.Rtf);
  14. odoc.ActiveWindow.Selection.Paste();
  15. Clipboard.Clear();
  16. Clipboard.SetText(LetterText,TextDataFormat.Rtf);
  17. odoc.ActiveWindow.Selection.Paste();
  18. //01/26/2021 JS having trouble with the save on Pam''s machine so going to try to capture the correct error.
  19. try
  20. {
  21. odoc.SaveAs(@BackUpSave);
  22. }
  23. catch (Exception exBU)
  24. {
  25. ErrorString = "Error trying to save " + @BackUpSave + ": " + exBU.Message;
  26. }
  27. try
  28. {
  29. odoc.ExportAsFixedFormat(@FileSave,WdExportFormat.wdExportFormatPDF);
  30. }
  31. catch (Exception exPDF)
  32. {
  33. if (string.IsNullOrEmpty(ErrorString))
  34. {
  35. ErrorString = "Error trying to save " + @FileSave + " PDF: " + exPDF.Message;
  36. }
  37. else
  38. {
  39. ErrorString += " and Error trying to save " + @FileSave + " PDF: " + exPDF.Message;
  40. }
  41. }
  42. }
  43. catch (Exception exInner)
  44. {
  45. ErrorString = exInner.Message;
  46. MessageBox.Show(exInner.Message,Properties.LetterResources.SavetoWord,MessageBoxButtons.OK,MessageBoxIcon.Error);
  47. }
  48. Clipboard.Clear();
  49. oWord.Quit(SaveChanges: 0);
  50. Marshal.FinalReleaseComObject(oWord);
  51. //oWord.Visible = true;
  52. }
  53. catch (Exception ex)
  54. {
  55. ErrorString = ex.Message;
  56. MessageBox.Show(ex.Message,MessageBoxIcon.Error);
  57. }
  58. }

错误发生在 odoc.SaveAs 行上,但仅在从 Windows 10 计算机运行时发生。最初,我使用了我机器上的互操作,但后来将其更改为 NuGet 互操作,但这并没有解决问题。我尝试将 Embed Interop Types 更改为 False 但这并没有解决任何问题,因此我将其改回。互操作引用的别名属性是全局的,特定版本属性是 True。由于富文本,我担心更改文档编写器的类型。应用程序的其余部分对于 Windows 10 用户来说运行良好。有什么想法吗?

解决方法

OpenXML 没有成功,因为它不允许我正确添加标题或导出为 PDF。尽管我非常希望使用 OpenXML,但我最终还是回到了 Word Interop。我能够通过如下设置参考属性来解决这个问题:

嵌入互操作类型 = False 复制本地 = True

现在无论哪个操作系统运行程序,保存都有效。我有上面的部分答案,但忽略了 Copy Local = true 部分。

CentOS 7 下MySQL 5.7.12主从复制架构配置记录(亲自验证可行)

CentOS 7 下MySQL 5.7.12主从复制架构配置记录(亲自验证可行)

转自:http://blog.csdn.net/testcs_dn/article/details/51423861


为什么使用主从架构?

1、实现服务器负载均衡;

2、通过复制实现数据的异地备份;

3、提高数据库系统的可用性;

4、可以分库【垂直拆分】,分表【水平拆分】;

主从配置的前提条件

1、MySQL版本一致;

你还没有安装MysqL?

请参考:CentOS 6.5 下安装MySQL 5.7.12,使用官网下载的rpm安装包

2、MysqL中的数据一致;

不一致就把它们搞一致!

3、操作前停止一切更新操作(写入、更新、删除等);

配置master(主服务器)

[plain] view plain copy
  1. vi/etc/my.cnf
  2. #[必须]启用二进制日志
  3. log-bin=MysqL-bin
  4. #[必须]服务器唯一ID,默认是1,一般取IP最后一段
  5. server-id=151

配置slave(从服务器)

copy

#[可选]启用二进制日志
  • server-id=152
  • CentOS 下MySQL 5.1.45 二进制版本安装及多Apache php版本安装

    CentOS 下MySQL 5.1.45 二进制版本安装及多Apache php版本安装

    1.下载二进制版本,现在很多网站都有相关的下载,大小大概117M左右,解压缩有大概384M 我下载的版本为:mysql-5.1.45-linux-i68

    1.下载二进制版本,现在很多网站都有相关的下载,大小大概117M左右,解压缩有大概384M

      我下载的版本为:mysql-5.1.45-linux-i686-glibc23

    2.从文件名看需要glibc2.3 版本。

     Shell>rpm -q glibc

    3.把mysql-5.1.45-linux-i686-glibc23 复制到/usr/local/mysql 下;

    4.把/usr/local/mysql 权限改为:chown mysql.mysql /usr/local/mysql

    5.cd /usr/local/mysql/script

    6.vi mysql_install_db 修改mysql 的目录和data创建的位置:

    basedir="/usr/local/mysql/"
    builddir=""
    ldata="/usr/local/mysql/data" #生成的数据库的文件存放的位置

    langdir="/usr/local/mysql/share"

    7.修改完成后执行该脚本,创建数据库

    8.修改data 权限:

       chown -R mysql.mysql /usr/local/mysql/data

    9.my.cnf 文件的修改:

      cp /usr/local/mysql/support-files/my-medium.cnf /etc/my5.cnf

    [client]
    #password       = your_password
    port            = 3308
    socket          = /tmp/mysql5145.sock

    # Here follows entries for some specific programs

    # The MySQL server
    [mysqld]
    port            = 3308
    socket          = /tmp/mysql5145.sock

    10.启动mysql:

    /usr/local/mysql/bin/mysqld_safe --defaults-file=''/etc/my5145.cnf'' --user=mysql &

    echo /usr/local/mysql/bin/mysqld_safe --defaults-file=''/etc/my5145.cnf'' --user=mysql & >> /etc/rc.local

    这样开机的时候就可以启动mysql

    10.完成。

    编译安装多个apache:

     如果之前的apache 安装在/usr/local/apache 下。

    现在就安装在/usr/local/apache2 下

    1.mkdir /usr/local/apache2

    2.开始编译:

    ./configure --prefix=/usr/local/apache2

    3.make

    4.make install

    安装多个php版本:

    先前的php4安装在/usr/local/php

    现在安装php5(php-5.2.11)在/usr/local/php5

    1.mkdir /usr/local/php5

    ./configure --prefix=/usr/local/php5 --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql=/usr/local/mysql --with-config-file-path=/usr/local/php5/lib -enable-track-vars --enable-sockets --with-zlib

    2.make && make install

    3.cp php.ini-dist /usr/local/php5/lib/php.ini

    4.编辑/usr/local/apache2/conf/httpd.conf

    a修改默认的监听端口:

    Listen 8080

    b修改启动的用户和组

    User

    Group

    c增加php的支持AddType

    d修改主页搜索顺序

    DirectoryIndex index.html index.php

    e增加中文的默认语言的支持

    DefaultCharset

    Centos 下Mysql 表名区分大小名问题

    Centos 下Mysql 表名区分大小名问题

    在Centos下安装Mysql后,发现执行SQL语句时区分大小写,大小写不一样就不能执行。

    查询资料发现:

        MySQL在Linux下数据库名、表名、列名、别名大小写规则是这样的:

    • 数据库名与表名是严格区分大小写的;
    • 表的别名是严格区分大小写的;
    • 列名与列的别名在所有的情况下均是忽略大小写的;
    • 变量名也是严格区分大小写的;

        MySQL在Windows下都不区分大小写。

    如果想在Linux下表名不区分大小写,以下是告诉你怎么解决此问题。

    1、配置

    找到Mysql配置文件my.cnf

    vi /etc/my.cnf 

    在配置文件中增加以下内容

    lower_case_table_names = 1
    #0:区分大小写,1:不区分大小写

    注:

    •     1、修改前必须先关闭服务,修改完成之后重启服务,就可以实现表名不区分大小写了。
    •     2、增加的内容必须增加在[mysql]下面不能加到最后,否则不设置不成功。

    2、验证是否配置成功

    [root@iZ2zee0ipi05o1446ponmvZ ~]#  mysql -uroot -p    #登录mysql
    Enter password:                                       #输入登录密码
    Welcome to the MySQL monitor.  Commands end with ; or \g.
    Your MySQL connection id is 43
    Server version: 5.6.39 MySQL Community Server (GPL)
    
    Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
    
    Oracle is a registered trademark of Oracle Corporation and/or its
    affiliates. Other names may be trademarks of their respective
    owners.
    
    Type ''help;'' or ''\h'' for help. Type ''\c'' to clear the current input statement.
    
    mysql> show variables like "%case%";                  #查看MySQL配置参数
    +------------------------+-------+
    | Variable_name          | Value |
    +------------------------+-------+
    | lower_case_file_system | OFF   |
    | lower_case_table_names | 1     |                    #1表示不区分大小写,0表示区分大小写
    +------------------------+-------+
    2 rows in set (0.00 sec)
    

     

     

    今天关于windows 下mysql 5.7.18的使用mysql5.7 win10的介绍到此结束,谢谢您的阅读,有关C# windows 窗体应用程序 Word Interop 适用于 Windows 7 但不适用于 Windows 10、CentOS 7 下MySQL 5.7.12主从复制架构配置记录(亲自验证可行)、CentOS 下MySQL 5.1.45 二进制版本安装及多Apache php版本安装、Centos 下Mysql 表名区分大小名问题等更多相关知识的信息可以在本站进行查询。

    本文标签: